radeonsi: skip DCC render feedback checking if color writes are disabled
This commit is contained in:
@@ -713,6 +713,11 @@ static void si_check_render_feedback_resident_images(struct si_context *sctx)
|
||||
|
||||
static void si_check_render_feedback(struct si_context *sctx)
|
||||
{
|
||||
/* There is no render feedback if color writes are disabled.
|
||||
* (e.g. a pixel shader with image stores)
|
||||
*/
|
||||
if (!si_get_total_colormask(sctx))
|
||||
return;
|
||||
|
||||
if (!sctx->need_check_render_feedback)
|
||||
return;
|
||||
|
||||
@@ -940,4 +940,21 @@ static inline unsigned si_get_ps_iter_samples(struct si_context *sctx)
|
||||
return sctx->ps_iter_samples;
|
||||
}
|
||||
|
||||
static inline unsigned si_get_total_colormask(struct si_context *sctx)
|
||||
{
|
||||
if (sctx->queued.named.rasterizer->rasterizer_discard)
|
||||
return 0;
|
||||
|
||||
struct si_shader_selector *ps = sctx->ps_shader.cso;
|
||||
unsigned colormask = sctx->framebuffer.colorbuf_enabled_4bit &
|
||||
sctx->queued.named.blend->cb_target_mask;
|
||||
|
||||
if (!ps->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS])
|
||||
colormask &= ps->colors_written_4bit;
|
||||
else if (!ps->colors_written_4bit)
|
||||
colormask = 0; /* color0 writes all cbufs, but it's not written */
|
||||
|
||||
return colormask;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1215,11 +1215,7 @@ static void si_shader_selector_key_hw_vs(struct si_context *sctx,
|
||||
ps->info.writes_samplemask ||
|
||||
alpha_to_coverage ||
|
||||
si_get_alpha_test_func(sctx) != PIPE_FUNC_ALWAYS;
|
||||
|
||||
unsigned ps_colormask = sctx->framebuffer.colorbuf_enabled_4bit &
|
||||
sctx->queued.named.blend->cb_target_mask;
|
||||
if (!ps->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS])
|
||||
ps_colormask &= ps->colors_written_4bit;
|
||||
unsigned ps_colormask = si_get_total_colormask(sctx);
|
||||
|
||||
ps_disabled = sctx->queued.named.rasterizer->rasterizer_discard ||
|
||||
(!ps_colormask &&
|
||||
|
||||
Reference in New Issue
Block a user