st/mesa: lower images when needed
The "st/pbo download FS" builtin shader uses image derefs, so even with PIPE_CAP_NIR_IMAGES_AS_DEREF set to 0 drivers ended up with those. Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5480>
This commit is contained in:
parent
365d0aa6c5
commit
e35e0307cb
|
@ -24,6 +24,7 @@
|
|||
#include "st_nir.h"
|
||||
|
||||
#include "compiler/nir/nir_builder.h"
|
||||
#include "compiler/glsl/gl_nir.h"
|
||||
|
||||
struct pipe_shader_state *
|
||||
st_nir_finish_builtin_shader(struct st_context *st,
|
||||
|
@ -58,6 +59,8 @@ st_nir_finish_builtin_shader(struct st_context *st,
|
|||
|
||||
st_nir_lower_samplers(screen, nir, NULL, NULL);
|
||||
st_nir_lower_uniforms(st, nir);
|
||||
if (!screen->get_param(screen, PIPE_CAP_NIR_IMAGES_AS_DEREF))
|
||||
NIR_PASS_V(nir, gl_nir_lower_images, false);
|
||||
|
||||
if (screen->finalize_nir)
|
||||
screen->finalize_nir(screen, nir, true);
|
||||
|
|
Loading…
Reference in New Issue