mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
nir: Don't set writes_memory for reading XFB
That's a read, not a write. Fixes optimizations getting disabled for fragment shaders when linked with a shader producing transform feedback varyings. Fixes:85a723975b("nir: add and gather shader_info::writes_memory") Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16285> (cherry picked from commitca280b2283)
This commit is contained in:
parent
9e99274fd6
commit
2981d3fa71
2 changed files with 3 additions and 2 deletions
|
|
@ -716,7 +716,7 @@
|
|||
"description": "nir: Don't set writes_memory for reading XFB",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"because_sha": "85a723975bbd651fa6692655b9a4f14b4405d0ae"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -907,7 +907,8 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint)
|
|||
shader->info.tess.tcs_cross_invocation_outputs_read = 0;
|
||||
}
|
||||
|
||||
shader->info.writes_memory = shader->info.has_transform_feedback_varyings;
|
||||
if (shader->info.stage != MESA_SHADER_FRAGMENT)
|
||||
shader->info.writes_memory = shader->info.has_transform_feedback_varyings;
|
||||
|
||||
void *dead_ctx = ralloc_context(NULL);
|
||||
nir_foreach_block(block, entrypoint) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue