aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-02-27 14:36:44 -0600
committerJason Ekstrand <[email protected]>2019-03-25 15:00:36 -0500
commit3bd54576415130465f096d73b7940dfbe02bb71b (patch)
tree41f7b4df6f3848b208e0b30b8a962553e8a53b15 /src/compiler/nir/nir.h
parent39da1deb497af55496308c0867b5ce5a0e9df56e (diff)
nir: Add a lowering pass for non-uniform resource access
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 1033b545d6a..40c5dcfe4ac 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -1485,6 +1485,12 @@ typedef struct {
/* gather offsets */
int8_t tg4_offsets[4][2];
+ /* True if the texture index or handle is not dynamically uniform */
+ bool texture_non_uniform;
+
+ /* True if the sampler index or handle is not dynamically uniform */
+ bool sampler_non_uniform;
+
/** The texture index
*
* If this texture instruction has a nir_tex_src_texture_offset source,
@@ -3259,6 +3265,16 @@ typedef struct nir_lower_tex_options {
bool nir_lower_tex(nir_shader *shader,
const nir_lower_tex_options *options);
+enum nir_lower_non_uniform_access_type {
+ nir_lower_non_uniform_ubo_access = (1 << 0),
+ nir_lower_non_uniform_ssbo_access = (1 << 1),
+ nir_lower_non_uniform_texture_access = (1 << 2),
+ nir_lower_non_uniform_image_access = (1 << 3),
+};
+
+bool nir_lower_non_uniform_access(nir_shader *shader,
+ enum nir_lower_non_uniform_access_type);
+
bool nir_lower_idiv(nir_shader *shader);
bool nir_lower_clip_vs(nir_shader *shader, unsigned ucp_enables, bool use_vars);