diff options
author | Marek Olšák <[email protected]> | 2019-07-22 21:08:48 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-07-23 15:08:37 -0400 |
commit | 45556731b6e099709a09eb8e65e27d7f709831b2 (patch) | |
tree | bea932101b0843b788c64f4c2b2b9c0cb911a695 /src/gallium | |
parent | ee858871bd8f9d9ea7179c266f57ac3f1604eb02 (diff) |
tgsi/scan: add uses_fbfetch
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.c | 3 | ||||
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_descriptors.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 4cb1a3152c3..37a223a0f68 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -411,6 +411,9 @@ scan_instruction(struct tgsi_shader_info *info, info->uses_bindless_image_store = true; } break; + case TGSI_OPCODE_FBFETCH: + info->uses_fbfetch = true; + break; default: break; } diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index 51d85af4fcb..a2938e5fd38 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -137,6 +137,7 @@ struct tgsi_shader_info boolean uses_derivatives; boolean uses_bindless_samplers; boolean uses_bindless_images; + boolean uses_fbfetch; unsigned clipdist_writemask; unsigned culldist_writemask; unsigned num_written_culldistance; diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index f7bd589e6d3..6d95cd7e891 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -899,7 +899,7 @@ void si_update_ps_colorbuf0_slot(struct si_context *sctx) /* See whether FBFETCH is used and color buffer 0 is set. */ if (sctx->ps_shader.cso && - sctx->ps_shader.cso->info.opcode_count[TGSI_OPCODE_FBFETCH] && + sctx->ps_shader.cso->info.uses_fbfetch && sctx->framebuffer.state.nr_cbufs && sctx->framebuffer.state.cbufs[0]) surf = sctx->framebuffer.state.cbufs[0]; |