pan/bi: Allow passing RT conversion descriptors to fragment shaders
The Vulkan copy shaders sometimes need to partially write a texel and issue a load on the FRAGOUT variable in that case, but they do know the format of the tile buffer in advance in that case. Let's not add an RT_CONVERSION sysval if we can avoid it. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12095>
This commit is contained in:
@@ -1078,6 +1078,8 @@ bi_emit_ld_tile(bi_builder *b, nir_intrinsic_instr *instr)
|
||||
|
||||
bi_index desc = b->shader->inputs->is_blend ?
|
||||
bi_imm_u32(b->shader->inputs->blend.bifrost_blend_desc >> 32) :
|
||||
b->shader->inputs->bifrost.static_rt_conv ?
|
||||
bi_imm_u32(b->shader->inputs->bifrost.rt_conv[rt]) :
|
||||
bi_load_sysval(b, PAN_SYSVAL(RT_CONVERSION, rt | (size << 4)), 1, 0);
|
||||
|
||||
bi_ld_tile_to(b, bi_dest_index(&instr->dest), bi_pixel_indices(b, rt),
|
||||
|
||||
@@ -132,6 +132,13 @@ struct panfrost_compile_inputs {
|
||||
|
||||
enum pipe_format rt_formats[8];
|
||||
unsigned nr_cbufs;
|
||||
|
||||
union {
|
||||
struct {
|
||||
bool static_rt_conv;
|
||||
uint32_t rt_conv[8];
|
||||
} bifrost;
|
||||
};
|
||||
};
|
||||
|
||||
struct pan_shader_varying {
|
||||
|
||||
Reference in New Issue
Block a user