summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-12-02 11:36:42 -0800
committerEric Anholt <[email protected]>2019-04-12 15:59:31 -0700
commit18ed82b084c79bf63666f2da22e5d675fb01aa26 (patch)
treedfb02920970472c7158b2bba889ad05a8ab10c0e /src/compiler/nir/nir.h
parent8a2d91e1248e31426ff656c02d3e598f9e117422 (diff)
nir: Add a pass for selectively lowering variables to scratch space
This commit adds new nir_load/store_scratch opcodes which read and write a virtual scratch space. It's up to the back-end to figure out what to do with it and where to put the actual scratch data. v2: Drop const_index comments (by anholt) Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 0f110dd959f..91cad825653 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2359,6 +2359,9 @@ typedef struct nir_shader {
*/
unsigned num_inputs, num_uniforms, num_outputs, num_shared;
+ /** Size in bytes of required scratch space */
+ unsigned scratch_size;
+
/** Constant data associated with this shader.
*
* Constant data is loaded through load_constant intrinsics. See also
@@ -3012,6 +3015,11 @@ void nir_lower_io_to_temporaries(nir_shader *shader,
nir_function_impl *entrypoint,
bool outputs, bool inputs);
+bool nir_lower_vars_to_scratch(nir_shader *shader,
+ nir_variable_mode modes,
+ int size_threshold,
+ glsl_type_size_align_func size_align);
+
void nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint);
void nir_assign_var_locations(struct exec_list *var_list, unsigned *size,