mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 18:40:42 +01:00
ir_variable: Track the location of uniforms, varings, attributes, etc.
This commit is contained in:
parent
371019248e
commit
69a079aee8
2 changed files with 18 additions and 0 deletions
1
ir.cpp
1
ir.cpp
|
|
@ -731,6 +731,7 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name)
|
|||
{
|
||||
this->type = type;
|
||||
this->name = name;
|
||||
this->location = -1;
|
||||
this->constant_value = NULL;
|
||||
|
||||
if (type && type->base_type == GLSL_TYPE_SAMPLER)
|
||||
|
|
|
|||
17
ir.h
17
ir.h
|
|
@ -217,6 +217,23 @@ public:
|
|||
*/
|
||||
unsigned array_lvalue:1;
|
||||
|
||||
/**
|
||||
* Storage location of the base of this variable
|
||||
*
|
||||
* The precise meaning of this field depends on the nature of the variable.
|
||||
*
|
||||
* - Vertex shader input: one of the values from \c gl_vert_attrib.
|
||||
* - Vertex shader output: one of the values from \c gl_vert_result.
|
||||
* - Fragment shader input: one of the values from \c gl_frag_attrib.
|
||||
* - Fragment shader output: one of the values from \c gl_frag_result.
|
||||
* - Uniforms: Per-stage uniform slot number.
|
||||
* - Other: This field is not currently used.
|
||||
*
|
||||
* If the variable is a uniform, shader input, or shader output, and the
|
||||
* slot has not been assigned, the value will be -1.
|
||||
*/
|
||||
int location;
|
||||
|
||||
/**
|
||||
* Emit a warning if this variable is accessed.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue