nir: pack the rest of nir_variable::data
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
parent
442ef8c3e3
commit
96e6ef80d9
|
@ -62,6 +62,7 @@ extern "C" {
|
|||
#define NIR_MAX_MATRIX_COLUMNS 4
|
||||
#define NIR_STREAM_PACKED (1 << 8)
|
||||
typedef uint8_t nir_component_mask_t;
|
||||
typedef unsigned short GLenum16;
|
||||
|
||||
/** Defines a cast function
|
||||
*
|
||||
|
@ -107,7 +108,7 @@ typedef enum {
|
|||
nir_var_mem_ssbo = (1 << 7),
|
||||
nir_var_mem_shared = (1 << 8),
|
||||
nir_var_mem_global = (1 << 9),
|
||||
nir_var_all = ~0,
|
||||
nir_var_all = (1 << 10) - 1,
|
||||
} nir_variable_mode;
|
||||
|
||||
/**
|
||||
|
@ -314,7 +315,7 @@ typedef struct nir_variable {
|
|||
*
|
||||
* \sa nir_variable_mode
|
||||
*/
|
||||
nir_variable_mode mode;
|
||||
nir_variable_mode mode:10;
|
||||
|
||||
/**
|
||||
* Is the variable read-only?
|
||||
|
@ -419,7 +420,32 @@ typedef struct nir_variable {
|
|||
* This is not equal to \c ir_depth_layout_none if and only if this
|
||||
* variable is \c gl_FragDepth and a layout qualifier is specified.
|
||||
*/
|
||||
nir_depth_layout depth_layout;
|
||||
nir_depth_layout depth_layout:3;
|
||||
|
||||
/**
|
||||
* Vertex stream output identifier.
|
||||
*
|
||||
* For packed outputs, NIR_STREAM_PACKED is set and bits [2*i+1,2*i]
|
||||
* indicate the stream of the i-th component.
|
||||
*/
|
||||
unsigned stream:9;
|
||||
|
||||
/**
|
||||
* output index for dual source blending.
|
||||
*/
|
||||
unsigned index;
|
||||
|
||||
/**
|
||||
* Descriptor set binding for sampler or UBO.
|
||||
*/
|
||||
int descriptor_set:5;
|
||||
|
||||
/**
|
||||
* Initial binding point for a sampler or UBO.
|
||||
*
|
||||
* For array types, this represents the binding point for the first element.
|
||||
*/
|
||||
unsigned binding:5;
|
||||
|
||||
/**
|
||||
* Storage location of the base of this variable
|
||||
|
@ -443,35 +469,10 @@ typedef struct nir_variable {
|
|||
int location;
|
||||
|
||||
/**
|
||||
* The actual location of the variable in the IR. Only valid for inputs
|
||||
* and outputs.
|
||||
* The actual location of the variable in the IR. Only valid for inputs,
|
||||
* outputs, and uniforms (including samplers and images).
|
||||
*/
|
||||
unsigned int driver_location;
|
||||
|
||||
/**
|
||||
* Vertex stream output identifier.
|
||||
*
|
||||
* For packed outputs, NIR_STREAM_PACKED is set and bits [2*i+1,2*i]
|
||||
* indicate the stream of the i-th component.
|
||||
*/
|
||||
unsigned stream:9;
|
||||
|
||||
/**
|
||||
* output index for dual source blending.
|
||||
*/
|
||||
int index;
|
||||
|
||||
/**
|
||||
* Descriptor set binding for sampler or UBO.
|
||||
*/
|
||||
int descriptor_set;
|
||||
|
||||
/**
|
||||
* Initial binding point for a sampler or UBO.
|
||||
*
|
||||
* For array types, this represents the binding point for the first element.
|
||||
*/
|
||||
unsigned binding;
|
||||
unsigned driver_location;
|
||||
|
||||
/**
|
||||
* Location an atomic counter or transform feedback is stored at.
|
||||
|
@ -483,10 +484,10 @@ typedef struct nir_variable {
|
|||
* ARB_shader_image_load_store qualifiers.
|
||||
*/
|
||||
struct {
|
||||
enum gl_access_qualifier access;
|
||||
enum gl_access_qualifier access:8;
|
||||
|
||||
/** Image internal format if specified explicitly, otherwise GL_NONE. */
|
||||
GLenum format;
|
||||
GLenum16 format;
|
||||
} image;
|
||||
|
||||
struct {
|
||||
|
|
Loading…
Reference in New Issue