diff options
author | Eric Anholt <[email protected]> | 2020-01-23 10:52:39 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-24 18:25:02 +0000 |
commit | 9c90ecf37ffab0978a983e49ecec48faebeb181a (patch) | |
tree | b2189e89ff2cd4a003b73638132289d4c0f23d63 /src/mesa | |
parent | 7342b859afb5a7e7f9fb1813e7ab3a55a1c8a704 (diff) |
gallium: Add a cap for enabling lowering of image load/store intrinsics.
The deref stuff is hard to handle in a backend supporting dynamic
indexing, while the lowering can easily turn that into the same kind of
dynamic indexing we do for textures, UBOs, and SSBOs.
Reviewed-by: Kenneth Graunke <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3728>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index ad104686310..d23719d49e8 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -941,6 +941,8 @@ st_finalize_nir(struct st_context *st, struct gl_program *prog, st_nir_lower_uniforms(st, nir); st_nir_lower_samplers(screen, nir, shader_program, prog); + if (!screen->get_param(screen, PIPE_CAP_NIR_IMAGES_AS_DEREF)) + NIR_PASS_V(nir, gl_nir_lower_images, false); if (finalize_by_driver && screen->finalize_nir) screen->finalize_nir(screen, nir, false); |