mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
nir: add some fields to nir_variable_data
These will be used to provide NIR linking functionality to GLSL. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
This commit is contained in:
parent
89b2b0f767
commit
56c25b938c
1 changed files with 28 additions and 0 deletions
|
|
@ -330,6 +330,19 @@ typedef struct nir_variable {
|
|||
unsigned patch:1;
|
||||
unsigned invariant:1;
|
||||
|
||||
/**
|
||||
* Precision qualifier.
|
||||
*
|
||||
* In desktop GLSL we do not care about precision qualifiers at all, in
|
||||
* fact, the spec says that precision qualifiers are ignored.
|
||||
*
|
||||
* To make things easy, we make it so that this field is always
|
||||
* GLSL_PRECISION_NONE on desktop shaders. This way all the variables
|
||||
* have the same precision value and the checks we add in the compiler
|
||||
* for this field will never break a desktop shader compile.
|
||||
*/
|
||||
unsigned precision:2;
|
||||
|
||||
/**
|
||||
* Can this variable be coalesced with another?
|
||||
*
|
||||
|
|
@ -392,6 +405,15 @@ typedef struct nir_variable {
|
|||
*/
|
||||
unsigned explicit_binding:1;
|
||||
|
||||
/**
|
||||
* Was the location explicitly set in the shader?
|
||||
*
|
||||
* If the location is explicitly set in the shader, it \b cannot be changed
|
||||
* by the linker or by the API (e.g., calls to \c glBindAttribLocation have
|
||||
* no effect).
|
||||
*/
|
||||
unsigned explicit_location:1;
|
||||
|
||||
/**
|
||||
* Was a transfer feedback buffer set in the shader?
|
||||
*/
|
||||
|
|
@ -407,6 +429,12 @@ typedef struct nir_variable {
|
|||
*/
|
||||
unsigned explicit_offset:1;
|
||||
|
||||
/**
|
||||
* Non-zero if this variable was created by lowering a named interface
|
||||
* block.
|
||||
*/
|
||||
unsigned from_named_ifc_block:1;
|
||||
|
||||
/**
|
||||
* How the variable was declared. See nir_var_declaration_type.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue