diff options
author | Kenneth Graunke <[email protected]> | 2015-04-07 17:13:45 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2015-04-11 11:39:48 -0700 |
commit | b3e286c4575bf6af343c1a03471fd876cdfb5c43 (patch) | |
tree | 4934c1751fae5ca735d359eeaf573a749c5b784e /src/glsl/nir | |
parent | f41f07f685e7f585e433b5fd1fadf602e74f0f1e (diff) |
nir: Store num_direct_uniforms in the nir_shader.
Storing this here is pretty sketchy - I don't know if any driver other
than i965 will want to use it. But this will make it a lot easier to
generate NIR code at link time. We'll probably rework it anyway.
(Ian suggested making nir_assign_var_locations_scalar_direct_first
simply modify the nir_shader's fields, rather than passing pointers
to them. If this stays long term, we should do that. But Jason and
I suspect we'll be reworking this area again in the near future.)
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/glsl/nir')
-rw-r--r-- | src/glsl/nir/nir.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 653123780ff..2d1d870b1f8 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1431,6 +1431,9 @@ typedef struct nir_shader { * access plus one */ unsigned num_inputs, num_uniforms, num_outputs; + + /** the number of uniforms that are only accessed directly */ + unsigned num_direct_uniforms; } nir_shader; #define nir_foreach_overload(shader, overload) \ |