mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
radv: gather MRTs that are written by the fragment shader
This will be used to filter color attachments without exports. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5786>
This commit is contained in:
parent
6e990a2f73
commit
49c7d28b0b
2 changed files with 5 additions and 0 deletions
|
|
@ -329,6 +329,7 @@ struct radv_shader_info {
|
||||||
bool allow_flat_shading;
|
bool allow_flat_shading;
|
||||||
bool has_epilog;
|
bool has_epilog;
|
||||||
unsigned spi_ps_input;
|
unsigned spi_ps_input;
|
||||||
|
unsigned colors_written;
|
||||||
} ps;
|
} ps;
|
||||||
struct {
|
struct {
|
||||||
bool uses_grid_size;
|
bool uses_grid_size;
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,10 @@ gather_intrinsic_store_output_info(const nir_shader *nir, const nir_intrinsic_in
|
||||||
case MESA_SHADER_GEOMETRY:
|
case MESA_SHADER_GEOMETRY:
|
||||||
output_usage_mask = info->gs.output_usage_mask;
|
output_usage_mask = info->gs.output_usage_mask;
|
||||||
break;
|
break;
|
||||||
|
case MESA_SHADER_FRAGMENT:
|
||||||
|
if (idx >= FRAG_RESULT_DATA0)
|
||||||
|
info->ps.colors_written |= 0xf << (4 * (idx - FRAG_RESULT_DATA0));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue