mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 07:10:15 +01: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 has_epilog;
|
||||
unsigned spi_ps_input;
|
||||
unsigned colors_written;
|
||||
} ps;
|
||||
struct {
|
||||
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:
|
||||
output_usage_mask = info->gs.output_usage_mask;
|
||||
break;
|
||||
case MESA_SHADER_FRAGMENT:
|
||||
if (idx >= FRAG_RESULT_DATA0)
|
||||
info->ps.colors_written |= 0xf << (4 * (idx - FRAG_RESULT_DATA0));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue