mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 09:40:08 +01:00
zink: run lower_io_to_scalar before rewriting bo access
this is happening in ntv anyway, so move it to the compiler here Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13484>
This commit is contained in:
parent
ee22cd619f
commit
3a1ecd1e8c
1 changed files with 6 additions and 2 deletions
|
|
@ -898,8 +898,10 @@ zink_shader_compile(struct zink_screen *screen, struct zink_shader *zs, nir_shad
|
|||
default: break;
|
||||
}
|
||||
}
|
||||
if (screen->driconf.inline_uniforms)
|
||||
if (screen->driconf.inline_uniforms) {
|
||||
NIR_PASS_V(nir, nir_lower_io_to_scalar, nir_var_mem_ubo | nir_var_mem_ssbo | nir_var_mem_shared);
|
||||
NIR_PASS_V(nir, rewrite_bo_access);
|
||||
}
|
||||
if (inlined_uniforms) {
|
||||
optimize_nir(nir);
|
||||
|
||||
|
|
@ -1413,8 +1415,10 @@ zink_shader_create(struct zink_screen *screen, struct nir_shader *nir,
|
|||
NIR_PASS_V(nir, lower_64bit_vertex_attribs);
|
||||
NIR_PASS_V(nir, unbreak_bos);
|
||||
/* run in compile if there could be inlined uniforms */
|
||||
if (!screen->driconf.inline_uniforms)
|
||||
if (!screen->driconf.inline_uniforms) {
|
||||
NIR_PASS_V(nir, nir_lower_io_to_scalar, nir_var_mem_ubo | nir_var_mem_ssbo | nir_var_mem_shared);
|
||||
NIR_PASS_V(nir, rewrite_bo_access);
|
||||
}
|
||||
|
||||
if (zink_debug & ZINK_DEBUG_NIR) {
|
||||
fprintf(stderr, "NIR shader:\n---8<---\n");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue