This will let us do MOCS settings right.
._3DCommandSubOpcode = 1, \
.DwordLength = 8
+struct GEN75_MEMORY_OBJECT_CONTROL_STATE {
+ uint32_t LLCeLLCCacheabilityControlLLCCC;
+ uint32_t L3CacheabilityControlL3CC;
+};
+
+static inline void
+GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN75_MEMORY_OBJECT_CONTROL_STATE * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->LLCeLLCCacheabilityControlLLCCC, 1, 2) |
+ __gen_field(values->L3CacheabilityControlL3CC, 0, 0) |
+ 0;
+
+}
+
struct GEN75_STATE_BASE_ADDRESS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
__gen_address_type GeneralStateBaseAddress;
- uint32_t GeneralStateMemoryObjectControlState;
- uint32_t StatelessDataPortAccessMemoryObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE GeneralStateMemoryObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE StatelessDataPortAccessMemoryObjectControlState;
uint32_t GeneralStateBaseAddressModifyEnable;
__gen_address_type SurfaceStateBaseAddress;
- uint32_t SurfaceStateMemoryObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE SurfaceStateMemoryObjectControlState;
uint32_t SurfaceStateBaseAddressModifyEnable;
__gen_address_type DynamicStateBaseAddress;
- uint32_t DynamicStateMemoryObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE DynamicStateMemoryObjectControlState;
uint32_t DynamicStateBaseAddressModifyEnable;
__gen_address_type IndirectObjectBaseAddress;
- uint32_t IndirectObjectMemoryObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE IndirectObjectMemoryObjectControlState;
uint32_t IndirectObjectBaseAddressModifyEnable;
__gen_address_type InstructionBaseAddress;
- uint32_t InstructionMemoryObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE InstructionMemoryObjectControlState;
uint32_t InstructionBaseAddressModifyEnable;
__gen_address_type GeneralStateAccessUpperBound;
uint32_t GeneralStateAccessUpperBoundModifyEnable;
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_GeneralStateMemoryObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_GeneralStateMemoryObjectControlState, &values->GeneralStateMemoryObjectControlState);
+ uint32_t dw_StatelessDataPortAccessMemoryObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StatelessDataPortAccessMemoryObjectControlState, &values->StatelessDataPortAccessMemoryObjectControlState);
uint32_t dw1 =
- /* Struct GeneralStateMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
- /* Struct StatelessDataPortAccessMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct GeneralStateMemoryObjectControlState (8..11): */
+ __gen_field(dw_GeneralStateMemoryObjectControlState, 8, 11) |
+ /* Struct StatelessDataPortAccessMemoryObjectControlState (4..7): */
+ __gen_field(dw_StatelessDataPortAccessMemoryObjectControlState, 4, 7) |
__gen_field(values->GeneralStateBaseAddressModifyEnable, 0, 0) |
0;
dw[1] =
__gen_combine_address(data, &dw[1], values->GeneralStateBaseAddress, dw1);
+ uint32_t dw_SurfaceStateMemoryObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceStateMemoryObjectControlState, &values->SurfaceStateMemoryObjectControlState);
uint32_t dw2 =
- /* Struct SurfaceStateMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SurfaceStateMemoryObjectControlState (8..11): */
+ __gen_field(dw_SurfaceStateMemoryObjectControlState, 8, 11) |
__gen_field(values->SurfaceStateBaseAddressModifyEnable, 0, 0) |
0;
dw[2] =
__gen_combine_address(data, &dw[2], values->SurfaceStateBaseAddress, dw2);
+ uint32_t dw_DynamicStateMemoryObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DynamicStateMemoryObjectControlState, &values->DynamicStateMemoryObjectControlState);
uint32_t dw3 =
- /* Struct DynamicStateMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct DynamicStateMemoryObjectControlState (8..11): */
+ __gen_field(dw_DynamicStateMemoryObjectControlState, 8, 11) |
__gen_field(values->DynamicStateBaseAddressModifyEnable, 0, 0) |
0;
dw[3] =
__gen_combine_address(data, &dw[3], values->DynamicStateBaseAddress, dw3);
+ uint32_t dw_IndirectObjectMemoryObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_IndirectObjectMemoryObjectControlState, &values->IndirectObjectMemoryObjectControlState);
uint32_t dw4 =
- /* Struct IndirectObjectMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct IndirectObjectMemoryObjectControlState (8..11): */
+ __gen_field(dw_IndirectObjectMemoryObjectControlState, 8, 11) |
__gen_field(values->IndirectObjectBaseAddressModifyEnable, 0, 0) |
0;
dw[4] =
__gen_combine_address(data, &dw[4], values->IndirectObjectBaseAddress, dw4);
+ uint32_t dw_InstructionMemoryObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_InstructionMemoryObjectControlState, &values->InstructionMemoryObjectControlState);
uint32_t dw5 =
- /* Struct InstructionMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct InstructionMemoryObjectControlState (8..11): */
+ __gen_field(dw_InstructionMemoryObjectControlState, 8, 11) |
__gen_field(values->InstructionBaseAddressModifyEnable, 0, 0) |
0;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
__gen_address_type SWTessellationBaseAddress;
- uint32_t SWTessellationMemoryObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE SWTessellationMemoryObjectControlState;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_SWTessellationMemoryObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SWTessellationMemoryObjectControlState, &values->SWTessellationMemoryObjectControlState);
uint32_t dw1 =
- /* Struct SWTessellationMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SWTessellationMemoryObjectControlState (8..11): */
+ __gen_field(dw_SWTessellationMemoryObjectControlState, 8, 11) |
0;
dw[1] =
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 70
+struct GEN75_BINDING_TABLE_EDIT_ENTRY {
+ uint32_t BindingTableIndex;
+ uint32_t SurfaceStatePointer;
+};
+
+static inline void
+GEN75_BINDING_TABLE_EDIT_ENTRY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN75_BINDING_TABLE_EDIT_ENTRY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->BindingTableIndex, 16, 23) |
+ __gen_offset(values->SurfaceStatePointer, 0, 15) |
+ 0;
+
+}
+
struct GEN75_3DSTATE_BINDING_TABLE_EDIT_DS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t DwordLength;
__gen_address_type BindingTablePoolBaseAddress;
uint32_t BindingTablePoolEnable;
- uint32_t SurfaceObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE SurfaceObjectControlState;
__gen_address_type BindingTablePoolUpperBound;
};
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_SurfaceObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceObjectControlState, &values->SurfaceObjectControlState);
uint32_t dw1 =
__gen_field(values->BindingTablePoolEnable, 11, 11) |
- /* Struct SurfaceObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SurfaceObjectControlState (7..10): */
+ __gen_field(dw_SurfaceObjectControlState, 7, 10) |
0;
dw[1] =
._3DCommandSubOpcode = 26, \
.DwordLength = 5
+struct GEN75_3DSTATE_CONSTANT_BODY {
+ uint32_t ConstantBuffer1ReadLength;
+ uint32_t ConstantBuffer0ReadLength;
+ uint32_t ConstantBuffer3ReadLength;
+ uint32_t ConstantBuffer2ReadLength;
+ __gen_address_type PointerToConstantBuffer0;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState;
+ __gen_address_type PointerToConstantBuffer1;
+ __gen_address_type PointerToConstantBuffer2;
+ __gen_address_type PointerToConstantBuffer3;
+};
+
+static inline void
+GEN75_3DSTATE_CONSTANT_BODY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN75_3DSTATE_CONSTANT_BODY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->ConstantBuffer1ReadLength, 16, 31) |
+ __gen_field(values->ConstantBuffer0ReadLength, 0, 15) |
+ 0;
+
+ dw[1] =
+ __gen_field(values->ConstantBuffer3ReadLength, 16, 31) |
+ __gen_field(values->ConstantBuffer2ReadLength, 0, 15) |
+ 0;
+
+ uint32_t dw_ConstantBufferObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState);
+ uint32_t dw2 =
+ /* Struct ConstantBufferObjectControlState (0..4): */
+ __gen_field(dw_ConstantBufferObjectControlState, 0, 4) |
+ 0;
+
+ dw[2] =
+ __gen_combine_address(data, &dw[2], values->PointerToConstantBuffer0, dw2);
+
+ uint32_t dw3 =
+ 0;
+
+ dw[3] =
+ __gen_combine_address(data, &dw[3], values->PointerToConstantBuffer1, dw3);
+
+ uint32_t dw4 =
+ 0;
+
+ dw[4] =
+ __gen_combine_address(data, &dw[4], values->PointerToConstantBuffer2, dw4);
+
+ uint32_t dw5 =
+ 0;
+
+ dw[5] =
+ __gen_combine_address(data, &dw[5], values->PointerToConstantBuffer3, dw5);
+
+}
+
struct GEN75_3DSTATE_CONSTANT_DS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN75_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN75_3DSTATE_CONSTANT_GS_length 0x00000007
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN75_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN75_3DSTATE_CONSTANT_HS_length 0x00000007
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN75_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN75_3DSTATE_CONSTANT_PS_length 0x00000007
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN75_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN75_3DSTATE_CONSTANT_VS_length 0x00000007
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN75_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN75_3DSTATE_DEPTH_BUFFER_length 0x00000007
#define SURFTYPE_CUBEmustbezero 0
uint32_t Depth;
uint32_t MinimumArrayElement;
- uint32_t DepthBufferObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE DepthBufferObjectControlState;
uint32_t DepthCoordinateOffsetY;
uint32_t DepthCoordinateOffsetX;
uint32_t RenderTargetViewExtent;
__gen_field(values->LOD, 0, 3) |
0;
+ uint32_t dw_DepthBufferObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DepthBufferObjectControlState, &values->DepthBufferObjectControlState);
dw[4] =
__gen_field(values->Depth, 21, 31) |
__gen_field(values->MinimumArrayElement, 10, 20) |
- /* Struct DepthBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct DepthBufferObjectControlState (0..3): */
+ __gen_field(dw_DepthBufferObjectControlState, 0, 3) |
0;
dw[5] =
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 55
+struct GEN75_GATHER_CONSTANT_ENTRY {
+ uint32_t ConstantBufferOffset;
+ uint32_t ChannelMask;
+ uint32_t BindingTableIndexOffset;
+};
+
+static inline void
+GEN75_GATHER_CONSTANT_ENTRY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN75_GATHER_CONSTANT_ENTRY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_offset(values->ConstantBufferOffset, 8, 15) |
+ __gen_field(values->ChannelMask, 4, 7) |
+ __gen_field(values->BindingTableIndexOffset, 0, 3) |
+ 0;
+
+}
+
struct GEN75_3DSTATE_GATHER_CONSTANT_DS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t DwordLength;
__gen_address_type GatherPoolBaseAddress;
uint32_t GatherPoolEnable;
- uint32_t MemoryObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState;
__gen_address_type GatherPoolUpperBound;
};
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_MemoryObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState);
uint32_t dw1 =
__gen_field(values->GatherPoolEnable, 11, 11) |
- /* Struct MemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct MemoryObjectControlState (0..3): */
+ __gen_field(dw_MemoryObjectControlState, 0, 3) |
0;
dw[1] =
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t HierarchicalDepthBufferObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE HierarchicalDepthBufferObjectControlState;
uint32_t SurfacePitch;
__gen_address_type SurfaceBaseAddress;
};
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_HierarchicalDepthBufferObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_HierarchicalDepthBufferObjectControlState, &values->HierarchicalDepthBufferObjectControlState);
dw[1] =
- /* Struct HierarchicalDepthBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct HierarchicalDepthBufferObjectControlState (25..28): */
+ __gen_field(dw_HierarchicalDepthBufferObjectControlState, 25, 28) |
__gen_field(values->SurfacePitch, 0, 16) |
0;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
- uint32_t MemoryObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState;
#define INDEX_BYTE 0
#define INDEX_WORD 1
#define INDEX_DWORD 2
{
uint32_t *dw = (uint32_t * restrict) dst;
+ uint32_t dw_MemoryObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState);
dw[0] =
__gen_field(values->CommandType, 29, 31) |
__gen_field(values->CommandSubType, 27, 28) |
__gen_field(values->_3DCommandOpcode, 24, 26) |
__gen_field(values->_3DCommandSubOpcode, 16, 23) |
- /* Struct MemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct MemoryObjectControlState (12..15): */
+ __gen_field(dw_MemoryObjectControlState, 12, 15) |
__gen_field(values->IndexFormat, 8, 9) |
__gen_field(values->DwordLength, 0, 7) |
0;
._3DCommandOpcode = 1, \
._3DCommandSubOpcode = 2
+struct GEN75_PALETTE_ENTRY {
+ uint32_t Alpha;
+ uint32_t Red;
+ uint32_t Green;
+ uint32_t Blue;
+};
+
+static inline void
+GEN75_PALETTE_ENTRY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN75_PALETTE_ENTRY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->Alpha, 24, 31) |
+ __gen_field(values->Red, 16, 23) |
+ __gen_field(values->Green, 8, 15) |
+ __gen_field(values->Blue, 0, 7) |
+ 0;
+
+}
+
struct GEN75_3DSTATE_SAMPLER_PALETTE_LOAD0 {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
uint32_t SOBufferIndex;
- uint32_t SOBufferObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE SOBufferObjectControlState;
uint32_t SurfacePitch;
__gen_address_type SurfaceBaseAddress;
__gen_address_type SurfaceEndAddress;
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_SOBufferObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SOBufferObjectControlState, &values->SOBufferObjectControlState);
dw[1] =
__gen_field(values->SOBufferIndex, 29, 30) |
- /* Struct SOBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SOBufferObjectControlState (25..28): */
+ __gen_field(dw_SOBufferObjectControlState, 25, 28) |
__gen_field(values->SurfacePitch, 0, 11) |
0;
._3DCommandOpcode = 1, \
._3DCommandSubOpcode = 23
+struct GEN75_SO_DECL {
+ uint32_t OutputBufferSlot;
+ uint32_t HoleFlag;
+ uint32_t RegisterIndex;
+ uint32_t ComponentMask;
+};
+
+static inline void
+GEN75_SO_DECL_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN75_SO_DECL * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->OutputBufferSlot, 12, 13) |
+ __gen_field(values->HoleFlag, 11, 11) |
+ __gen_field(values->RegisterIndex, 4, 9) |
+ __gen_field(values->ComponentMask, 0, 3) |
+ 0;
+
+}
+
+struct GEN75_SO_DECL_ENTRY {
+ struct GEN75_SO_DECL Stream3Decl;
+ struct GEN75_SO_DECL Stream2Decl;
+ struct GEN75_SO_DECL Stream1Decl;
+ struct GEN75_SO_DECL Stream0Decl;
+};
+
+static inline void
+GEN75_SO_DECL_ENTRY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN75_SO_DECL_ENTRY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ uint32_t dw_Stream3Decl;
+ GEN75_SO_DECL_pack(data, &dw_Stream3Decl, &values->Stream3Decl);
+ uint32_t dw_Stream2Decl;
+ GEN75_SO_DECL_pack(data, &dw_Stream2Decl, &values->Stream2Decl);
+ uint32_t dw_Stream1Decl;
+ GEN75_SO_DECL_pack(data, &dw_Stream1Decl, &values->Stream1Decl);
+ uint32_t dw_Stream0Decl;
+ GEN75_SO_DECL_pack(data, &dw_Stream0Decl, &values->Stream0Decl);
+ dw[0] =
+ /* Struct Stream3Decl (48..63): */
+ __gen_field(dw_Stream3Decl, 48, 63) |
+ /* Struct Stream2Decl (32..47): */
+ __gen_field(dw_Stream2Decl, 32, 47) |
+ /* Struct Stream1Decl (16..31): */
+ __gen_field(dw_Stream1Decl, 16, 31) |
+ /* Struct Stream0Decl (0..15): */
+ __gen_field(dw_Stream0Decl, 0, 15) |
+ 0;
+
+ GEN75_SO_DECL_pack(data, &dw[0], &values->Stream0Decl);
+}
+
struct GEN75_3DSTATE_SO_DECL_LIST {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
uint32_t StencilBufferEnable;
- uint32_t StencilBufferObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE StencilBufferObjectControlState;
uint32_t SurfacePitch;
__gen_address_type SurfaceBaseAddress;
};
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_StencilBufferObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StencilBufferObjectControlState, &values->StencilBufferObjectControlState);
dw[1] =
__gen_field(values->StencilBufferEnable, 31, 31) |
- /* Struct StencilBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct StencilBufferObjectControlState (25..28): */
+ __gen_field(dw_StencilBufferObjectControlState, 25, 28) |
__gen_field(values->SurfacePitch, 0, 16) |
0;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 8
+struct GEN75_VERTEX_BUFFER_STATE {
+ uint32_t VertexBufferIndex;
+#define VERTEXDATA 0
+#define INSTANCEDATA 1
+ uint32_t BufferAccessType;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE VertexBufferMemoryObjectControlState;
+ uint32_t AddressModifyEnable;
+ uint32_t NullVertexBuffer;
+ uint32_t VertexFetchInvalidate;
+ uint32_t BufferPitch;
+ __gen_address_type BufferStartingAddress;
+ __gen_address_type EndAddress;
+ uint32_t InstanceDataStepRate;
+};
+
+static inline void
+GEN75_VERTEX_BUFFER_STATE_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN75_VERTEX_BUFFER_STATE * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ uint32_t dw_VertexBufferMemoryObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_VertexBufferMemoryObjectControlState, &values->VertexBufferMemoryObjectControlState);
+ dw[0] =
+ __gen_field(values->VertexBufferIndex, 26, 31) |
+ __gen_field(values->BufferAccessType, 20, 20) |
+ /* Struct VertexBufferMemoryObjectControlState (16..19): */
+ __gen_field(dw_VertexBufferMemoryObjectControlState, 16, 19) |
+ __gen_field(values->AddressModifyEnable, 14, 14) |
+ __gen_field(values->NullVertexBuffer, 13, 13) |
+ __gen_field(values->VertexFetchInvalidate, 12, 12) |
+ __gen_field(values->BufferPitch, 0, 11) |
+ 0;
+
+ uint32_t dw1 =
+ 0;
+
+ dw[1] =
+ __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1);
+
+ uint32_t dw2 =
+ 0;
+
+ dw[2] =
+ __gen_combine_address(data, &dw[2], values->EndAddress, dw2);
+
+ dw[3] =
+ __gen_field(values->InstanceDataStepRate, 0, 31) |
+ 0;
+
+}
+
struct GEN75_3DSTATE_VERTEX_BUFFERS {
uint32_t CommandType;
uint32_t CommandSubType;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 9
+struct GEN75_VERTEX_ELEMENT_STATE {
+ uint32_t VertexBufferIndex;
+ uint32_t Valid;
+ uint32_t SourceElementFormat;
+ uint32_t EdgeFlagEnable;
+ uint32_t SourceElementOffset;
+ uint32_t Component0Control;
+ uint32_t Component1Control;
+ uint32_t Component2Control;
+ uint32_t Component3Control;
+};
+
+static inline void
+GEN75_VERTEX_ELEMENT_STATE_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN75_VERTEX_ELEMENT_STATE * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->VertexBufferIndex, 26, 31) |
+ __gen_field(values->Valid, 25, 25) |
+ __gen_field(values->SourceElementFormat, 16, 24) |
+ __gen_field(values->EdgeFlagEnable, 15, 15) |
+ __gen_field(values->SourceElementOffset, 0, 11) |
+ 0;
+
+ dw[1] =
+ __gen_field(values->Component0Control, 28, 30) |
+ __gen_field(values->Component1Control, 24, 26) |
+ __gen_field(values->Component2Control, 20, 22) |
+ __gen_field(values->Component3Control, 16, 18) |
+ 0;
+
+}
+
struct GEN75_3DSTATE_VERTEX_ELEMENTS {
uint32_t CommandType;
uint32_t CommandSubType;
}
-struct GEN75_3DSTATE_CONSTANT_BODY {
- uint32_t ConstantBuffer1ReadLength;
- uint32_t ConstantBuffer0ReadLength;
- uint32_t ConstantBuffer3ReadLength;
- uint32_t ConstantBuffer2ReadLength;
- __gen_address_type PointerToConstantBuffer0;
- uint32_t ConstantBufferObjectControlState;
- __gen_address_type PointerToConstantBuffer1;
- __gen_address_type PointerToConstantBuffer2;
- __gen_address_type PointerToConstantBuffer3;
-};
-
-static inline void
-GEN75_3DSTATE_CONSTANT_BODY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN75_3DSTATE_CONSTANT_BODY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->ConstantBuffer1ReadLength, 16, 31) |
- __gen_field(values->ConstantBuffer0ReadLength, 0, 15) |
- 0;
-
- dw[1] =
- __gen_field(values->ConstantBuffer3ReadLength, 16, 31) |
- __gen_field(values->ConstantBuffer2ReadLength, 0, 15) |
- 0;
-
- uint32_t dw2 =
- /* Struct ConstantBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
- 0;
-
- dw[2] =
- __gen_combine_address(data, &dw[2], values->PointerToConstantBuffer0, dw2);
-
- uint32_t dw3 =
- 0;
-
- dw[3] =
- __gen_combine_address(data, &dw[3], values->PointerToConstantBuffer1, dw3);
-
- uint32_t dw4 =
- 0;
-
- dw[4] =
- __gen_combine_address(data, &dw[4], values->PointerToConstantBuffer2, dw4);
-
- uint32_t dw5 =
- 0;
-
- dw[5] =
- __gen_combine_address(data, &dw[5], values->PointerToConstantBuffer3, dw5);
-
-}
-
-struct GEN75_BINDING_TABLE_EDIT_ENTRY {
- uint32_t BindingTableIndex;
- uint32_t SurfaceStatePointer;
-};
-
-static inline void
-GEN75_BINDING_TABLE_EDIT_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN75_BINDING_TABLE_EDIT_ENTRY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->BindingTableIndex, 16, 23) |
- __gen_offset(values->SurfaceStatePointer, 0, 15) |
- 0;
-
-}
-
-struct GEN75_GATHER_CONSTANT_ENTRY {
- uint32_t ConstantBufferOffset;
- uint32_t ChannelMask;
- uint32_t BindingTableIndexOffset;
-};
-
-static inline void
-GEN75_GATHER_CONSTANT_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN75_GATHER_CONSTANT_ENTRY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_offset(values->ConstantBufferOffset, 8, 15) |
- __gen_field(values->ChannelMask, 4, 7) |
- __gen_field(values->BindingTableIndexOffset, 0, 3) |
- 0;
-
-}
-
-struct GEN75_VERTEX_BUFFER_STATE {
- uint32_t VertexBufferIndex;
-#define VERTEXDATA 0
-#define INSTANCEDATA 1
- uint32_t BufferAccessType;
- uint32_t VertexBufferMemoryObjectControlState;
- uint32_t AddressModifyEnable;
- uint32_t NullVertexBuffer;
- uint32_t VertexFetchInvalidate;
- uint32_t BufferPitch;
- __gen_address_type BufferStartingAddress;
- __gen_address_type EndAddress;
- uint32_t InstanceDataStepRate;
-};
-
-static inline void
-GEN75_VERTEX_BUFFER_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN75_VERTEX_BUFFER_STATE * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->VertexBufferIndex, 26, 31) |
- __gen_field(values->BufferAccessType, 20, 20) |
- /* Struct VertexBufferMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
- __gen_field(values->AddressModifyEnable, 14, 14) |
- __gen_field(values->NullVertexBuffer, 13, 13) |
- __gen_field(values->VertexFetchInvalidate, 12, 12) |
- __gen_field(values->BufferPitch, 0, 11) |
- 0;
-
- uint32_t dw1 =
- 0;
-
- dw[1] =
- __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1);
-
- uint32_t dw2 =
- 0;
-
- dw[2] =
- __gen_combine_address(data, &dw[2], values->EndAddress, dw2);
-
- dw[3] =
- __gen_field(values->InstanceDataStepRate, 0, 31) |
- 0;
-
-}
-
-struct GEN75_VERTEX_ELEMENT_STATE {
- uint32_t VertexBufferIndex;
- uint32_t Valid;
- uint32_t SourceElementFormat;
- uint32_t EdgeFlagEnable;
- uint32_t SourceElementOffset;
- uint32_t Component0Control;
- uint32_t Component1Control;
- uint32_t Component2Control;
- uint32_t Component3Control;
-};
-
-static inline void
-GEN75_VERTEX_ELEMENT_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN75_VERTEX_ELEMENT_STATE * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->VertexBufferIndex, 26, 31) |
- __gen_field(values->Valid, 25, 25) |
- __gen_field(values->SourceElementFormat, 16, 24) |
- __gen_field(values->EdgeFlagEnable, 15, 15) |
- __gen_field(values->SourceElementOffset, 0, 11) |
- 0;
-
- dw[1] =
- __gen_field(values->Component0Control, 28, 30) |
- __gen_field(values->Component1Control, 24, 26) |
- __gen_field(values->Component2Control, 20, 22) |
- __gen_field(values->Component3Control, 16, 18) |
- 0;
-
-}
-
-struct GEN75_SO_DECL_ENTRY {
- uint32_t Stream3Decl;
- uint32_t Stream2Decl;
- uint32_t Stream1Decl;
- uint32_t Stream0Decl;
-};
-
-static inline void
-GEN75_SO_DECL_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN75_SO_DECL_ENTRY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- /* Struct Stream3Decl: found SO_DECL */
- /* Struct Stream2Decl: found SO_DECL */
- /* Struct Stream1Decl: found SO_DECL */
- /* Struct Stream0Decl: found SO_DECL */
- 0;
-
-}
-
-struct GEN75_SO_DECL {
- uint32_t OutputBufferSlot;
- uint32_t HoleFlag;
- uint32_t RegisterIndex;
- uint32_t ComponentMask;
-};
-
-static inline void
-GEN75_SO_DECL_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN75_SO_DECL * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->OutputBufferSlot, 12, 13) |
- __gen_field(values->HoleFlag, 11, 11) |
- __gen_field(values->RegisterIndex, 4, 9) |
- __gen_field(values->ComponentMask, 0, 3) |
- 0;
-
-}
-
struct GEN75_SCISSOR_RECT {
uint32_t ScissorRectangleYMin;
uint32_t ScissorRectangleXMin;
}
-struct GEN75_MEMORY_OBJECT_CONTROL_STATE {
- uint32_t L3CacheabilityControlL3CC;
-};
-
-static inline void
-GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN75_MEMORY_OBJECT_CONTROL_STATE * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->L3CacheabilityControlL3CC, 0, 0) |
- 0;
-
-}
-
struct GEN75_VEB_DI_IECP_COMMAND_SURFACE_CONTROL_BITS {
#define Highestpriority 0
#define Secondhighestpriority 1
}
-struct GEN75_PALETTE_ENTRY {
- uint32_t Alpha;
- uint32_t Red;
- uint32_t Green;
- uint32_t Blue;
-};
-
-static inline void
-GEN75_PALETTE_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN75_PALETTE_ENTRY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->Alpha, 24, 31) |
- __gen_field(values->Red, 16, 23) |
- __gen_field(values->Green, 8, 15) |
- __gen_field(values->Blue, 0, 7) |
- 0;
-
-}
-
struct GEN75_RENDER_SURFACE_STATE {
#define SURFTYPE_1D 0
#define SURFTYPE_2D 1
uint32_t MinimumArrayElement0;
uint32_t XOffset;
uint32_t YOffset;
- uint32_t SurfaceObjectControlState;
+ struct GEN75_MEMORY_OBJECT_CONTROL_STATE SurfaceObjectControlState;
uint32_t SurfaceMinLOD;
uint32_t MIPCountLOD;
__gen_address_type MCSBaseAddress;
__gen_field(values->MinimumArrayElement, 0, 26) |
0;
+ uint32_t dw_SurfaceObjectControlState;
+ GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceObjectControlState, &values->SurfaceObjectControlState);
dw[5] =
__gen_offset(values->XOffset, 25, 31) |
__gen_offset(values->YOffset, 20, 23) |
- /* Struct SurfaceObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SurfaceObjectControlState (16..19): */
+ __gen_field(dw_SurfaceObjectControlState, 16, 19) |
__gen_field(values->SurfaceMinLOD, 4, 7) |
__gen_field(values->MIPCountLOD, 0, 3) |
0;
._3DCommandSubOpcode = 1, \
.DwordLength = 8
+struct GEN7_MEMORY_OBJECT_CONTROL_STATE {
+ uint32_t GraphicsDataTypeGFDT;
+ uint32_t LLCCacheabilityControlLLCCC;
+ uint32_t L3CacheabilityControlL3CC;
+};
+
+static inline void
+GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN7_MEMORY_OBJECT_CONTROL_STATE * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->GraphicsDataTypeGFDT, 2, 2) |
+ __gen_field(values->LLCCacheabilityControlLLCCC, 1, 1) |
+ __gen_field(values->L3CacheabilityControlL3CC, 0, 0) |
+ 0;
+
+}
+
struct GEN7_STATE_BASE_ADDRESS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
__gen_address_type GeneralStateBaseAddress;
- uint32_t GeneralStateMemoryObjectControlState;
- uint32_t StatelessDataPortAccessMemoryObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE GeneralStateMemoryObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE StatelessDataPortAccessMemoryObjectControlState;
uint32_t StatelessDataPortAccessForceWriteThru;
uint32_t GeneralStateBaseAddressModifyEnable;
__gen_address_type SurfaceStateBaseAddress;
- uint32_t SurfaceStateMemoryObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE SurfaceStateMemoryObjectControlState;
uint32_t SurfaceStateBaseAddressModifyEnable;
__gen_address_type DynamicStateBaseAddress;
- uint32_t DynamicStateMemoryObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE DynamicStateMemoryObjectControlState;
uint32_t DynamicStateBaseAddressModifyEnable;
__gen_address_type IndirectObjectBaseAddress;
- uint32_t IndirectObjectMemoryObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE IndirectObjectMemoryObjectControlState;
uint32_t IndirectObjectBaseAddressModifyEnable;
__gen_address_type InstructionBaseAddress;
- uint32_t InstructionMemoryObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE InstructionMemoryObjectControlState;
uint32_t InstructionBaseAddressModifyEnable;
__gen_address_type GeneralStateAccessUpperBound;
uint32_t GeneralStateAccessUpperBoundModifyEnable;
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_GeneralStateMemoryObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_GeneralStateMemoryObjectControlState, &values->GeneralStateMemoryObjectControlState);
+ uint32_t dw_StatelessDataPortAccessMemoryObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StatelessDataPortAccessMemoryObjectControlState, &values->StatelessDataPortAccessMemoryObjectControlState);
uint32_t dw1 =
- /* Struct GeneralStateMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
- /* Struct StatelessDataPortAccessMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct GeneralStateMemoryObjectControlState (8..11): */
+ __gen_field(dw_GeneralStateMemoryObjectControlState, 8, 11) |
+ /* Struct StatelessDataPortAccessMemoryObjectControlState (4..7): */
+ __gen_field(dw_StatelessDataPortAccessMemoryObjectControlState, 4, 7) |
__gen_field(values->StatelessDataPortAccessForceWriteThru, 3, 3) |
__gen_field(values->GeneralStateBaseAddressModifyEnable, 0, 0) |
0;
dw[1] =
__gen_combine_address(data, &dw[1], values->GeneralStateBaseAddress, dw1);
+ uint32_t dw_SurfaceStateMemoryObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceStateMemoryObjectControlState, &values->SurfaceStateMemoryObjectControlState);
uint32_t dw2 =
- /* Struct SurfaceStateMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SurfaceStateMemoryObjectControlState (8..11): */
+ __gen_field(dw_SurfaceStateMemoryObjectControlState, 8, 11) |
__gen_field(values->SurfaceStateBaseAddressModifyEnable, 0, 0) |
0;
dw[2] =
__gen_combine_address(data, &dw[2], values->SurfaceStateBaseAddress, dw2);
+ uint32_t dw_DynamicStateMemoryObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DynamicStateMemoryObjectControlState, &values->DynamicStateMemoryObjectControlState);
uint32_t dw3 =
- /* Struct DynamicStateMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct DynamicStateMemoryObjectControlState (8..11): */
+ __gen_field(dw_DynamicStateMemoryObjectControlState, 8, 11) |
__gen_field(values->DynamicStateBaseAddressModifyEnable, 0, 0) |
0;
dw[3] =
__gen_combine_address(data, &dw[3], values->DynamicStateBaseAddress, dw3);
+ uint32_t dw_IndirectObjectMemoryObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_IndirectObjectMemoryObjectControlState, &values->IndirectObjectMemoryObjectControlState);
uint32_t dw4 =
- /* Struct IndirectObjectMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct IndirectObjectMemoryObjectControlState (8..11): */
+ __gen_field(dw_IndirectObjectMemoryObjectControlState, 8, 11) |
__gen_field(values->IndirectObjectBaseAddressModifyEnable, 0, 0) |
0;
dw[4] =
__gen_combine_address(data, &dw[4], values->IndirectObjectBaseAddress, dw4);
+ uint32_t dw_InstructionMemoryObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_InstructionMemoryObjectControlState, &values->InstructionMemoryObjectControlState);
uint32_t dw5 =
- /* Struct InstructionMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct InstructionMemoryObjectControlState (8..11): */
+ __gen_field(dw_InstructionMemoryObjectControlState, 8, 11) |
__gen_field(values->InstructionBaseAddressModifyEnable, 0, 0) |
0;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
__gen_address_type SWTessellationBaseAddress;
- uint32_t SWTessellationMemoryObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE SWTessellationMemoryObjectControlState;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_SWTessellationMemoryObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SWTessellationMemoryObjectControlState, &values->SWTessellationMemoryObjectControlState);
uint32_t dw1 =
- /* Struct SWTessellationMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SWTessellationMemoryObjectControlState (8..11): */
+ __gen_field(dw_SWTessellationMemoryObjectControlState, 8, 11) |
0;
dw[1] =
._3DCommandSubOpcode = 26, \
.DwordLength = 5
+struct GEN7_3DSTATE_CONSTANT_BODY {
+ uint32_t ConstantBuffer1ReadLength;
+ uint32_t ConstantBuffer0ReadLength;
+ uint32_t ConstantBuffer3ReadLength;
+ uint32_t ConstantBuffer2ReadLength;
+ __gen_address_type PointerToConstantBuffer0;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState;
+ __gen_address_type PointerToConstantBuffer1;
+ __gen_address_type PointerToConstantBuffer2;
+ __gen_address_type PointerToConstantBuffer3;
+};
+
+static inline void
+GEN7_3DSTATE_CONSTANT_BODY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN7_3DSTATE_CONSTANT_BODY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->ConstantBuffer1ReadLength, 16, 31) |
+ __gen_field(values->ConstantBuffer0ReadLength, 0, 15) |
+ 0;
+
+ dw[1] =
+ __gen_field(values->ConstantBuffer3ReadLength, 16, 31) |
+ __gen_field(values->ConstantBuffer2ReadLength, 0, 15) |
+ 0;
+
+ uint32_t dw_ConstantBufferObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState);
+ uint32_t dw2 =
+ /* Struct ConstantBufferObjectControlState (0..4): */
+ __gen_field(dw_ConstantBufferObjectControlState, 0, 4) |
+ 0;
+
+ dw[2] =
+ __gen_combine_address(data, &dw[2], values->PointerToConstantBuffer0, dw2);
+
+ uint32_t dw3 =
+ 0;
+
+ dw[3] =
+ __gen_combine_address(data, &dw[3], values->PointerToConstantBuffer1, dw3);
+
+ uint32_t dw4 =
+ 0;
+
+ dw[4] =
+ __gen_combine_address(data, &dw[4], values->PointerToConstantBuffer2, dw4);
+
+ uint32_t dw5 =
+ 0;
+
+ dw[5] =
+ __gen_combine_address(data, &dw[5], values->PointerToConstantBuffer3, dw5);
+
+}
+
struct GEN7_3DSTATE_CONSTANT_DS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN7_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN7_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN7_3DSTATE_CONSTANT_GS_length 0x00000007
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN7_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN7_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN7_3DSTATE_CONSTANT_HS_length 0x00000007
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN7_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN7_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN7_3DSTATE_CONSTANT_PS_length 0x00000007
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN7_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN7_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN7_3DSTATE_CONSTANT_VS_length 0x00000007
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN7_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN7_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN7_3DSTATE_DEPTH_BUFFER_length 0x00000007
#define SURFTYPE_CUBEmustbezero 0
uint32_t Depth;
uint32_t MinimumArrayElement;
- uint32_t DepthBufferObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE DepthBufferObjectControlState;
uint32_t DepthCoordinateOffsetY;
uint32_t DepthCoordinateOffsetX;
uint32_t RenderTargetViewExtent;
__gen_field(values->LOD, 0, 3) |
0;
+ uint32_t dw_DepthBufferObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DepthBufferObjectControlState, &values->DepthBufferObjectControlState);
dw[4] =
__gen_field(values->Depth, 21, 31) |
__gen_field(values->MinimumArrayElement, 10, 20) |
- /* Struct DepthBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct DepthBufferObjectControlState (0..3): */
+ __gen_field(dw_DepthBufferObjectControlState, 0, 3) |
0;
dw[5] =
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t HierarchicalDepthBufferObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE HierarchicalDepthBufferObjectControlState;
uint32_t SurfacePitch;
__gen_address_type SurfaceBaseAddress;
};
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_HierarchicalDepthBufferObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_HierarchicalDepthBufferObjectControlState, &values->HierarchicalDepthBufferObjectControlState);
dw[1] =
- /* Struct HierarchicalDepthBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct HierarchicalDepthBufferObjectControlState (25..28): */
+ __gen_field(dw_HierarchicalDepthBufferObjectControlState, 25, 28) |
__gen_field(values->SurfacePitch, 0, 16) |
0;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
- uint32_t MemoryObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState;
uint32_t CutIndexEnable;
#define INDEX_BYTE 0
#define INDEX_WORD 1
{
uint32_t *dw = (uint32_t * restrict) dst;
+ uint32_t dw_MemoryObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState);
dw[0] =
__gen_field(values->CommandType, 29, 31) |
__gen_field(values->CommandSubType, 27, 28) |
__gen_field(values->_3DCommandOpcode, 24, 26) |
__gen_field(values->_3DCommandSubOpcode, 16, 23) |
- /* Struct MemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct MemoryObjectControlState (12..15): */
+ __gen_field(dw_MemoryObjectControlState, 12, 15) |
__gen_field(values->CutIndexEnable, 10, 10) |
__gen_field(values->IndexFormat, 8, 9) |
__gen_field(values->DwordLength, 0, 7) |
._3DCommandOpcode = 1, \
._3DCommandSubOpcode = 2
+struct GEN7_PALETTE_ENTRY {
+ uint32_t Alpha;
+ uint32_t Red;
+ uint32_t Green;
+ uint32_t Blue;
+};
+
+static inline void
+GEN7_PALETTE_ENTRY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN7_PALETTE_ENTRY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->Alpha, 24, 31) |
+ __gen_field(values->Red, 16, 23) |
+ __gen_field(values->Green, 8, 15) |
+ __gen_field(values->Blue, 0, 7) |
+ 0;
+
+}
+
struct GEN7_3DSTATE_SAMPLER_PALETTE_LOAD0 {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
uint32_t SOBufferIndex;
- uint32_t SOBufferObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE SOBufferObjectControlState;
uint32_t SurfacePitch;
__gen_address_type SurfaceBaseAddress;
__gen_address_type SurfaceEndAddress;
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_SOBufferObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SOBufferObjectControlState, &values->SOBufferObjectControlState);
dw[1] =
__gen_field(values->SOBufferIndex, 29, 30) |
- /* Struct SOBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SOBufferObjectControlState (25..28): */
+ __gen_field(dw_SOBufferObjectControlState, 25, 28) |
__gen_field(values->SurfacePitch, 0, 11) |
0;
._3DCommandOpcode = 1, \
._3DCommandSubOpcode = 23
+struct GEN7_SO_DECL {
+ uint32_t OutputBufferSlot;
+ uint32_t HoleFlag;
+ uint32_t RegisterIndex;
+ uint32_t ComponentMask;
+};
+
+static inline void
+GEN7_SO_DECL_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN7_SO_DECL * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->OutputBufferSlot, 12, 13) |
+ __gen_field(values->HoleFlag, 11, 11) |
+ __gen_field(values->RegisterIndex, 4, 9) |
+ __gen_field(values->ComponentMask, 0, 3) |
+ 0;
+
+}
+
+struct GEN7_SO_DECL_ENTRY {
+ struct GEN7_SO_DECL Stream3Decl;
+ struct GEN7_SO_DECL Stream2Decl;
+ struct GEN7_SO_DECL Stream1Decl;
+ struct GEN7_SO_DECL Stream0Decl;
+};
+
+static inline void
+GEN7_SO_DECL_ENTRY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN7_SO_DECL_ENTRY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ uint32_t dw_Stream3Decl;
+ GEN7_SO_DECL_pack(data, &dw_Stream3Decl, &values->Stream3Decl);
+ uint32_t dw_Stream2Decl;
+ GEN7_SO_DECL_pack(data, &dw_Stream2Decl, &values->Stream2Decl);
+ uint32_t dw_Stream1Decl;
+ GEN7_SO_DECL_pack(data, &dw_Stream1Decl, &values->Stream1Decl);
+ uint32_t dw_Stream0Decl;
+ GEN7_SO_DECL_pack(data, &dw_Stream0Decl, &values->Stream0Decl);
+ dw[0] =
+ /* Struct Stream3Decl (48..63): */
+ __gen_field(dw_Stream3Decl, 48, 63) |
+ /* Struct Stream2Decl (32..47): */
+ __gen_field(dw_Stream2Decl, 32, 47) |
+ /* Struct Stream1Decl (16..31): */
+ __gen_field(dw_Stream1Decl, 16, 31) |
+ /* Struct Stream0Decl (0..15): */
+ __gen_field(dw_Stream0Decl, 0, 15) |
+ 0;
+
+ GEN7_SO_DECL_pack(data, &dw[0], &values->Stream0Decl);
+}
+
struct GEN7_3DSTATE_SO_DECL_LIST {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t StencilBufferObjectControlState;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE StencilBufferObjectControlState;
uint32_t SurfacePitch;
__gen_address_type SurfaceBaseAddress;
};
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_StencilBufferObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StencilBufferObjectControlState, &values->StencilBufferObjectControlState);
dw[1] =
- /* Struct StencilBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct StencilBufferObjectControlState (25..28): */
+ __gen_field(dw_StencilBufferObjectControlState, 25, 28) |
__gen_field(values->SurfacePitch, 0, 16) |
0;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 8
+struct GEN7_VERTEX_BUFFER_STATE {
+ uint32_t VertexBufferIndex;
+#define VERTEXDATA 0
+#define INSTANCEDATA 1
+ uint32_t BufferAccessType;
+ struct GEN7_MEMORY_OBJECT_CONTROL_STATE VertexBufferMemoryObjectControlState;
+ uint32_t AddressModifyEnable;
+ uint32_t NullVertexBuffer;
+ uint32_t VertexFetchInvalidate;
+ uint32_t BufferPitch;
+ __gen_address_type BufferStartingAddress;
+ __gen_address_type EndAddress;
+ uint32_t InstanceDataStepRate;
+};
+
+static inline void
+GEN7_VERTEX_BUFFER_STATE_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN7_VERTEX_BUFFER_STATE * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ uint32_t dw_VertexBufferMemoryObjectControlState;
+ GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_VertexBufferMemoryObjectControlState, &values->VertexBufferMemoryObjectControlState);
+ dw[0] =
+ __gen_field(values->VertexBufferIndex, 26, 31) |
+ __gen_field(values->BufferAccessType, 20, 20) |
+ /* Struct VertexBufferMemoryObjectControlState (16..19): */
+ __gen_field(dw_VertexBufferMemoryObjectControlState, 16, 19) |
+ __gen_field(values->AddressModifyEnable, 14, 14) |
+ __gen_field(values->NullVertexBuffer, 13, 13) |
+ __gen_field(values->VertexFetchInvalidate, 12, 12) |
+ __gen_field(values->BufferPitch, 0, 11) |
+ 0;
+
+ uint32_t dw1 =
+ 0;
+
+ dw[1] =
+ __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1);
+
+ uint32_t dw2 =
+ 0;
+
+ dw[2] =
+ __gen_combine_address(data, &dw[2], values->EndAddress, dw2);
+
+ dw[3] =
+ __gen_field(values->InstanceDataStepRate, 0, 31) |
+ 0;
+
+}
+
struct GEN7_3DSTATE_VERTEX_BUFFERS {
uint32_t CommandType;
uint32_t CommandSubType;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 9
+struct GEN7_VERTEX_ELEMENT_STATE {
+ uint32_t VertexBufferIndex;
+ uint32_t Valid;
+ uint32_t SourceElementFormat;
+ uint32_t EdgeFlagEnable;
+ uint32_t SourceElementOffset;
+ uint32_t Component0Control;
+ uint32_t Component1Control;
+ uint32_t Component2Control;
+ uint32_t Component3Control;
+};
+
+static inline void
+GEN7_VERTEX_ELEMENT_STATE_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN7_VERTEX_ELEMENT_STATE * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->VertexBufferIndex, 26, 31) |
+ __gen_field(values->Valid, 25, 25) |
+ __gen_field(values->SourceElementFormat, 16, 24) |
+ __gen_field(values->EdgeFlagEnable, 15, 15) |
+ __gen_field(values->SourceElementOffset, 0, 11) |
+ 0;
+
+ dw[1] =
+ __gen_field(values->Component0Control, 28, 30) |
+ __gen_field(values->Component1Control, 24, 26) |
+ __gen_field(values->Component2Control, 20, 22) |
+ __gen_field(values->Component3Control, 16, 18) |
+ 0;
+
+}
+
struct GEN7_3DSTATE_VERTEX_ELEMENTS {
uint32_t CommandType;
uint32_t CommandSubType;
}
-struct GEN7_3DSTATE_CONSTANT_BODY {
- uint32_t ConstantBuffer1ReadLength;
- uint32_t ConstantBuffer0ReadLength;
- uint32_t ConstantBuffer3ReadLength;
- uint32_t ConstantBuffer2ReadLength;
- __gen_address_type PointerToConstantBuffer0;
- uint32_t ConstantBufferObjectControlState;
- __gen_address_type PointerToConstantBuffer1;
- __gen_address_type PointerToConstantBuffer2;
- __gen_address_type PointerToConstantBuffer3;
-};
-
-static inline void
-GEN7_3DSTATE_CONSTANT_BODY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN7_3DSTATE_CONSTANT_BODY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->ConstantBuffer1ReadLength, 16, 31) |
- __gen_field(values->ConstantBuffer0ReadLength, 0, 15) |
- 0;
-
- dw[1] =
- __gen_field(values->ConstantBuffer3ReadLength, 16, 31) |
- __gen_field(values->ConstantBuffer2ReadLength, 0, 15) |
- 0;
-
- uint32_t dw2 =
- /* Struct ConstantBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
- 0;
-
- dw[2] =
- __gen_combine_address(data, &dw[2], values->PointerToConstantBuffer0, dw2);
-
- uint32_t dw3 =
- 0;
-
- dw[3] =
- __gen_combine_address(data, &dw[3], values->PointerToConstantBuffer1, dw3);
-
- uint32_t dw4 =
- 0;
-
- dw[4] =
- __gen_combine_address(data, &dw[4], values->PointerToConstantBuffer2, dw4);
-
- uint32_t dw5 =
- 0;
-
- dw[5] =
- __gen_combine_address(data, &dw[5], values->PointerToConstantBuffer3, dw5);
-
-}
-
-struct GEN7_VERTEX_BUFFER_STATE {
- uint32_t VertexBufferIndex;
-#define VERTEXDATA 0
-#define INSTANCEDATA 1
- uint32_t BufferAccessType;
- uint32_t VertexBufferMemoryObjectControlState;
- uint32_t AddressModifyEnable;
- uint32_t NullVertexBuffer;
- uint32_t VertexFetchInvalidate;
- uint32_t BufferPitch;
- __gen_address_type BufferStartingAddress;
- __gen_address_type EndAddress;
- uint32_t InstanceDataStepRate;
-};
-
-static inline void
-GEN7_VERTEX_BUFFER_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN7_VERTEX_BUFFER_STATE * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->VertexBufferIndex, 26, 31) |
- __gen_field(values->BufferAccessType, 20, 20) |
- /* Struct VertexBufferMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
- __gen_field(values->AddressModifyEnable, 14, 14) |
- __gen_field(values->NullVertexBuffer, 13, 13) |
- __gen_field(values->VertexFetchInvalidate, 12, 12) |
- __gen_field(values->BufferPitch, 0, 11) |
- 0;
-
- uint32_t dw1 =
- 0;
-
- dw[1] =
- __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1);
-
- uint32_t dw2 =
- 0;
-
- dw[2] =
- __gen_combine_address(data, &dw[2], values->EndAddress, dw2);
-
- dw[3] =
- __gen_field(values->InstanceDataStepRate, 0, 31) |
- 0;
-
-}
-
-struct GEN7_VERTEX_ELEMENT_STATE {
- uint32_t VertexBufferIndex;
- uint32_t Valid;
- uint32_t SourceElementFormat;
- uint32_t EdgeFlagEnable;
- uint32_t SourceElementOffset;
- uint32_t Component0Control;
- uint32_t Component1Control;
- uint32_t Component2Control;
- uint32_t Component3Control;
-};
-
-static inline void
-GEN7_VERTEX_ELEMENT_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN7_VERTEX_ELEMENT_STATE * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->VertexBufferIndex, 26, 31) |
- __gen_field(values->Valid, 25, 25) |
- __gen_field(values->SourceElementFormat, 16, 24) |
- __gen_field(values->EdgeFlagEnable, 15, 15) |
- __gen_field(values->SourceElementOffset, 0, 11) |
- 0;
-
- dw[1] =
- __gen_field(values->Component0Control, 28, 30) |
- __gen_field(values->Component1Control, 24, 26) |
- __gen_field(values->Component2Control, 20, 22) |
- __gen_field(values->Component3Control, 16, 18) |
- 0;
-
-}
-
-struct GEN7_SO_DECL_ENTRY {
- uint32_t Stream3Decl;
- uint32_t Stream2Decl;
- uint32_t Stream1Decl;
- uint32_t Stream0Decl;
-};
-
-static inline void
-GEN7_SO_DECL_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN7_SO_DECL_ENTRY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- /* Struct Stream3Decl: found SO_DECL */
- /* Struct Stream2Decl: found SO_DECL */
- /* Struct Stream1Decl: found SO_DECL */
- /* Struct Stream0Decl: found SO_DECL */
- 0;
-
-}
-
-struct GEN7_SO_DECL {
- uint32_t OutputBufferSlot;
- uint32_t HoleFlag;
- uint32_t RegisterIndex;
- uint32_t ComponentMask;
-};
-
-static inline void
-GEN7_SO_DECL_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN7_SO_DECL * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->OutputBufferSlot, 12, 13) |
- __gen_field(values->HoleFlag, 11, 11) |
- __gen_field(values->RegisterIndex, 4, 9) |
- __gen_field(values->ComponentMask, 0, 3) |
- 0;
-
-}
-
struct GEN7_SCISSOR_RECT {
uint32_t ScissorRectangleYMin;
uint32_t ScissorRectangleXMin;
}
-struct GEN7_MEMORY_OBJECT_CONTROL_STATE {
- uint32_t GraphicsDataTypeGFDT;
- uint32_t LLCCacheabilityControlLLCCC;
- uint32_t L3CacheabilityControlL3CC;
-};
-
-static inline void
-GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN7_MEMORY_OBJECT_CONTROL_STATE * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->GraphicsDataTypeGFDT, 2, 2) |
- __gen_field(values->LLCCacheabilityControlLLCCC, 1, 1) |
- __gen_field(values->L3CacheabilityControlL3CC, 0, 0) |
- 0;
-
-}
-
struct GEN7_INTERFACE_DESCRIPTOR_DATA {
uint32_t KernelStartPointer;
#define Multiple 0
}
-struct GEN7_PALETTE_ENTRY {
- uint32_t Alpha;
- uint32_t Red;
- uint32_t Green;
- uint32_t Blue;
-};
-
-static inline void
-GEN7_PALETTE_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN7_PALETTE_ENTRY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->Alpha, 24, 31) |
- __gen_field(values->Red, 16, 23) |
- __gen_field(values->Green, 8, 15) |
- __gen_field(values->Blue, 0, 7) |
- 0;
-
-}
-
struct GEN7_SAMPLER_BORDER_COLOR_STATE {
uint32_t BorderColorRedDX100GL;
uint32_t BorderColorAlpha;
._3DCommandSubOpcode = 1, \
.DwordLength = 14
+struct GEN8_MEMORY_OBJECT_CONTROL_STATE {
+#define UCwithFenceifcoherentcycle 0
+#define UCUncacheable 1
+#define WT 2
+#define WB 3
+ uint32_t MemoryTypeLLCeLLCCacheabilityControl;
+#define eLLCOnlywheneDRAMispresentelsegetsallocatedinLLC 0
+#define LLCOnly 1
+#define LLCeLLCAllowed 2
+#define L3DefertoPATforLLCeLLCselection 3
+ uint32_t TargetCache;
+ uint32_t AgeforQUADLRU;
+};
+
+static inline void
+GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_MEMORY_OBJECT_CONTROL_STATE * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->MemoryTypeLLCeLLCCacheabilityControl, 5, 6) |
+ __gen_field(values->TargetCache, 3, 4) |
+ __gen_field(values->AgeforQUADLRU, 0, 1) |
+ 0;
+
+}
+
struct GEN8_STATE_BASE_ADDRESS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
__gen_address_type GeneralStateBaseAddress;
- uint32_t GeneralStateMemoryObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE GeneralStateMemoryObjectControlState;
uint32_t GeneralStateBaseAddressModifyEnable;
- uint32_t StatelessDataPortAccessMemoryObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE StatelessDataPortAccessMemoryObjectControlState;
__gen_address_type SurfaceStateBaseAddress;
- uint32_t SurfaceStateMemoryObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE SurfaceStateMemoryObjectControlState;
uint32_t SurfaceStateBaseAddressModifyEnable;
__gen_address_type DynamicStateBaseAddress;
- uint32_t DynamicStateMemoryObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE DynamicStateMemoryObjectControlState;
uint32_t DynamicStateBaseAddressModifyEnable;
__gen_address_type IndirectObjectBaseAddress;
- uint32_t IndirectObjectMemoryObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE IndirectObjectMemoryObjectControlState;
uint32_t IndirectObjectBaseAddressModifyEnable;
__gen_address_type InstructionBaseAddress;
- uint32_t InstructionMemoryObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE InstructionMemoryObjectControlState;
uint32_t InstructionBaseAddressModifyEnable;
uint32_t GeneralStateBufferSize;
uint32_t GeneralStateBufferSizeModifyEnable;
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_GeneralStateMemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_GeneralStateMemoryObjectControlState, &values->GeneralStateMemoryObjectControlState);
uint32_t dw1 =
- /* Struct GeneralStateMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct GeneralStateMemoryObjectControlState (4..10): */
+ __gen_field(dw_GeneralStateMemoryObjectControlState, 4, 10) |
__gen_field(values->GeneralStateBaseAddressModifyEnable, 0, 0) |
0;
dw[1] =
__gen_combine_address(data, &dw[1], values->GeneralStateBaseAddress, dw1);
+ uint32_t dw_StatelessDataPortAccessMemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StatelessDataPortAccessMemoryObjectControlState, &values->StatelessDataPortAccessMemoryObjectControlState);
dw[3] =
- /* Struct StatelessDataPortAccessMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct StatelessDataPortAccessMemoryObjectControlState (16..22): */
+ __gen_field(dw_StatelessDataPortAccessMemoryObjectControlState, 16, 22) |
0;
+ uint32_t dw_SurfaceStateMemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceStateMemoryObjectControlState, &values->SurfaceStateMemoryObjectControlState);
uint32_t dw4 =
- /* Struct SurfaceStateMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SurfaceStateMemoryObjectControlState (4..10): */
+ __gen_field(dw_SurfaceStateMemoryObjectControlState, 4, 10) |
__gen_field(values->SurfaceStateBaseAddressModifyEnable, 0, 0) |
0;
dw[4] =
__gen_combine_address(data, &dw[4], values->SurfaceStateBaseAddress, dw4);
+ uint32_t dw_DynamicStateMemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DynamicStateMemoryObjectControlState, &values->DynamicStateMemoryObjectControlState);
uint32_t dw6 =
- /* Struct DynamicStateMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct DynamicStateMemoryObjectControlState (4..10): */
+ __gen_field(dw_DynamicStateMemoryObjectControlState, 4, 10) |
__gen_field(values->DynamicStateBaseAddressModifyEnable, 0, 0) |
0;
dw[6] =
__gen_combine_address(data, &dw[6], values->DynamicStateBaseAddress, dw6);
+ uint32_t dw_IndirectObjectMemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_IndirectObjectMemoryObjectControlState, &values->IndirectObjectMemoryObjectControlState);
uint32_t dw8 =
- /* Struct IndirectObjectMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct IndirectObjectMemoryObjectControlState (4..10): */
+ __gen_field(dw_IndirectObjectMemoryObjectControlState, 4, 10) |
__gen_field(values->IndirectObjectBaseAddressModifyEnable, 0, 0) |
0;
dw[8] =
__gen_combine_address(data, &dw[8], values->IndirectObjectBaseAddress, dw8);
+ uint32_t dw_InstructionMemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_InstructionMemoryObjectControlState, &values->InstructionMemoryObjectControlState);
uint32_t dw10 =
- /* Struct InstructionMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct InstructionMemoryObjectControlState (4..10): */
+ __gen_field(dw_InstructionMemoryObjectControlState, 4, 10) |
__gen_field(values->InstructionBaseAddressModifyEnable, 0, 0) |
0;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
__gen_address_type SWTessellationBaseAddress;
- uint32_t SWTessellationMemoryObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE SWTessellationMemoryObjectControlState;
__gen_address_type SWTessellationBaseAddressHigh;
};
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_SWTessellationMemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SWTessellationMemoryObjectControlState, &values->SWTessellationMemoryObjectControlState);
uint32_t dw1 =
- /* Struct SWTessellationMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SWTessellationMemoryObjectControlState (8..11): */
+ __gen_field(dw_SWTessellationMemoryObjectControlState, 8, 11) |
0;
dw[1] =
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 70
+struct GEN8_BINDING_TABLE_EDIT_ENTRY {
+ uint32_t BindingTableIndex;
+ uint32_t SurfaceStatePointer;
+};
+
+static inline void
+GEN8_BINDING_TABLE_EDIT_ENTRY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_BINDING_TABLE_EDIT_ENTRY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->BindingTableIndex, 16, 23) |
+ __gen_offset(values->SurfaceStatePointer, 0, 15) |
+ 0;
+
+}
+
struct GEN8_3DSTATE_BINDING_TABLE_EDIT_DS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t DwordLength;
__gen_address_type BindingTablePoolBaseAddress;
uint32_t BindingTablePoolEnable;
- uint32_t SurfaceObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE SurfaceObjectControlState;
#define NoValidData 0
uint32_t BindingTablePoolBufferSize;
};
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_SurfaceObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceObjectControlState, &values->SurfaceObjectControlState);
uint32_t dw1 =
__gen_field(values->BindingTablePoolEnable, 11, 11) |
- /* Struct SurfaceObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SurfaceObjectControlState (0..6): */
+ __gen_field(dw_SurfaceObjectControlState, 0, 6) |
0;
dw[1] =
._3DCommandSubOpcode = 26, \
.DwordLength = 9
+struct GEN8_3DSTATE_CONSTANT_BODY {
+ uint32_t ConstantBuffer1ReadLength;
+ uint32_t ConstantBuffer0ReadLength;
+ uint32_t ConstantBuffer3ReadLength;
+ uint32_t ConstantBuffer2ReadLength;
+ __gen_address_type PointerToConstantBuffer0;
+ __gen_address_type PointerToConstantBuffer1;
+ __gen_address_type PointerToConstantBuffer2;
+ __gen_address_type PointerToConstantBuffer3;
+};
+
+static inline void
+GEN8_3DSTATE_CONSTANT_BODY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_3DSTATE_CONSTANT_BODY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->ConstantBuffer1ReadLength, 16, 31) |
+ __gen_field(values->ConstantBuffer0ReadLength, 0, 15) |
+ 0;
+
+ dw[1] =
+ __gen_field(values->ConstantBuffer3ReadLength, 16, 31) |
+ __gen_field(values->ConstantBuffer2ReadLength, 0, 15) |
+ 0;
+
+ uint32_t dw2 =
+ 0;
+
+ dw[2] =
+ __gen_combine_address(data, &dw[2], values->PointerToConstantBuffer0, dw2);
+
+ uint32_t dw4 =
+ 0;
+
+ dw[4] =
+ __gen_combine_address(data, &dw[4], values->PointerToConstantBuffer1, dw4);
+
+ uint32_t dw6 =
+ 0;
+
+ dw[6] =
+ __gen_combine_address(data, &dw[6], values->PointerToConstantBuffer2, dw6);
+
+ uint32_t dw8 =
+ 0;
+
+ dw[8] =
+ __gen_combine_address(data, &dw[8], values->PointerToConstantBuffer3, dw8);
+
+}
+
struct GEN8_3DSTATE_CONSTANT_DS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
- uint32_t ConstantBufferObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN8_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
{
uint32_t *dw = (uint32_t * restrict) dst;
+ uint32_t dw_ConstantBufferObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState);
dw[0] =
__gen_field(values->CommandType, 29, 31) |
__gen_field(values->CommandSubType, 27, 28) |
__gen_field(values->_3DCommandOpcode, 24, 26) |
__gen_field(values->_3DCommandSubOpcode, 16, 23) |
- /* Struct ConstantBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct ConstantBufferObjectControlState (8..14): */
+ __gen_field(dw_ConstantBufferObjectControlState, 8, 14) |
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN8_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN8_3DSTATE_CONSTANT_GS_length 0x0000000b
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
- uint32_t ConstantBufferObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN8_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
{
uint32_t *dw = (uint32_t * restrict) dst;
+ uint32_t dw_ConstantBufferObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState);
dw[0] =
__gen_field(values->CommandType, 29, 31) |
__gen_field(values->CommandSubType, 27, 28) |
__gen_field(values->_3DCommandOpcode, 24, 26) |
__gen_field(values->_3DCommandSubOpcode, 16, 23) |
- /* Struct ConstantBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct ConstantBufferObjectControlState (8..14): */
+ __gen_field(dw_ConstantBufferObjectControlState, 8, 14) |
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN8_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN8_3DSTATE_CONSTANT_HS_length 0x0000000b
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
- uint32_t ConstantBufferObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN8_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
{
uint32_t *dw = (uint32_t * restrict) dst;
+ uint32_t dw_ConstantBufferObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState);
dw[0] =
__gen_field(values->CommandType, 29, 31) |
__gen_field(values->CommandSubType, 27, 28) |
__gen_field(values->_3DCommandOpcode, 24, 26) |
__gen_field(values->_3DCommandSubOpcode, 16, 23) |
- /* Struct ConstantBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct ConstantBufferObjectControlState (8..14): */
+ __gen_field(dw_ConstantBufferObjectControlState, 8, 14) |
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN8_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN8_3DSTATE_CONSTANT_PS_length 0x0000000b
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
- uint32_t ConstantBufferObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN8_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
{
uint32_t *dw = (uint32_t * restrict) dst;
+ uint32_t dw_ConstantBufferObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState);
dw[0] =
__gen_field(values->CommandType, 29, 31) |
__gen_field(values->CommandSubType, 27, 28) |
__gen_field(values->_3DCommandOpcode, 24, 26) |
__gen_field(values->_3DCommandSubOpcode, 16, 23) |
- /* Struct ConstantBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct ConstantBufferObjectControlState (8..14): */
+ __gen_field(dw_ConstantBufferObjectControlState, 8, 14) |
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN8_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN8_3DSTATE_CONSTANT_VS_length 0x0000000b
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
- uint32_t ConstantBufferObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState;
uint32_t DwordLength;
- uint32_t ConstantBody;
+ struct GEN8_3DSTATE_CONSTANT_BODY ConstantBody;
};
static inline void
{
uint32_t *dw = (uint32_t * restrict) dst;
+ uint32_t dw_ConstantBufferObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState);
dw[0] =
__gen_field(values->CommandType, 29, 31) |
__gen_field(values->CommandSubType, 27, 28) |
__gen_field(values->_3DCommandOpcode, 24, 26) |
__gen_field(values->_3DCommandSubOpcode, 16, 23) |
- /* Struct ConstantBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct ConstantBufferObjectControlState (8..14): */
+ __gen_field(dw_ConstantBufferObjectControlState, 8, 14) |
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct ConstantBody: found 3DSTATE_CONSTANT(Body) */
- 0;
-
+ GEN8_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody);
}
#define GEN8_3DSTATE_DEPTH_BUFFER_length 0x00000008
uint32_t LOD;
uint32_t Depth;
uint32_t MinimumArrayElement;
- uint32_t DepthBufferObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE DepthBufferObjectControlState;
uint32_t RenderTargetViewExtent;
uint32_t SurfaceQPitch;
};
__gen_field(values->LOD, 0, 3) |
0;
+ uint32_t dw_DepthBufferObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DepthBufferObjectControlState, &values->DepthBufferObjectControlState);
dw[5] =
__gen_field(values->Depth, 21, 31) |
__gen_field(values->MinimumArrayElement, 10, 20) |
- /* Struct DepthBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct DepthBufferObjectControlState (0..6): */
+ __gen_field(dw_DepthBufferObjectControlState, 0, 6) |
0;
dw[6] =
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 55
+struct GEN8_GATHER_CONSTANT_ENTRY {
+ uint32_t ConstantBufferOffset;
+ uint32_t ChannelMask;
+ uint32_t BindingTableIndexOffset;
+};
+
+static inline void
+GEN8_GATHER_CONSTANT_ENTRY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_GATHER_CONSTANT_ENTRY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_offset(values->ConstantBufferOffset, 8, 15) |
+ __gen_field(values->ChannelMask, 4, 7) |
+ __gen_field(values->BindingTableIndexOffset, 0, 3) |
+ 0;
+
+}
+
struct GEN8_3DSTATE_GATHER_CONSTANT_DS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t DwordLength;
__gen_address_type GatherPoolBaseAddress;
uint32_t GatherPoolEnable;
- uint32_t MemoryObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState;
uint32_t GatherPoolBufferSize;
};
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_MemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState);
uint32_t dw1 =
__gen_field(values->GatherPoolEnable, 11, 11) |
- /* Struct MemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct MemoryObjectControlState (0..6): */
+ __gen_field(dw_MemoryObjectControlState, 0, 6) |
0;
dw[1] =
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t HierarchicalDepthBufferObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE HierarchicalDepthBufferObjectControlState;
uint32_t SurfacePitch;
__gen_address_type SurfaceBaseAddress;
uint32_t SurfaceQPitch;
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_HierarchicalDepthBufferObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_HierarchicalDepthBufferObjectControlState, &values->HierarchicalDepthBufferObjectControlState);
dw[1] =
- /* Struct HierarchicalDepthBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct HierarchicalDepthBufferObjectControlState (25..31): */
+ __gen_field(dw_HierarchicalDepthBufferObjectControlState, 25, 31) |
__gen_field(values->SurfacePitch, 0, 16) |
0;
#define INDEX_WORD 1
#define INDEX_DWORD 2
uint32_t IndexFormat;
- uint32_t MemoryObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState;
__gen_address_type BufferStartingAddress;
uint32_t BufferSize;
};
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_MemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState);
dw[1] =
__gen_field(values->IndexFormat, 8, 9) |
- /* Struct MemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct MemoryObjectControlState (0..6): */
+ __gen_field(dw_MemoryObjectControlState, 0, 6) |
0;
uint32_t dw2 =
._3DCommandOpcode = 1, \
._3DCommandSubOpcode = 2
+struct GEN8_PALETTE_ENTRY {
+ uint32_t Alpha;
+ uint32_t Red;
+ uint32_t Green;
+ uint32_t Blue;
+};
+
+static inline void
+GEN8_PALETTE_ENTRY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_PALETTE_ENTRY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->Alpha, 24, 31) |
+ __gen_field(values->Red, 16, 23) |
+ __gen_field(values->Green, 8, 15) |
+ __gen_field(values->Blue, 0, 7) |
+ 0;
+
+}
+
struct GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0 {
uint32_t CommandType;
uint32_t CommandSubType;
._3DCommandSubOpcode = 81, \
.DwordLength = 9
+struct GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL {
+ uint32_t ComponentOverrideW;
+ uint32_t ComponentOverrideZ;
+ uint32_t ComponentOverrideY;
+ uint32_t ComponentOverrideX;
+ uint32_t SwizzleControlMode;
+#define CONST_0000 0
+#define CONST_0001_FLOAT 1
+#define CONST_1111_FLOAT 2
+#define PRIM_ID 3
+ uint32_t ConstantSource;
+#define INPUTATTR 0
+#define INPUTATTR_FACING 1
+#define INPUTATTR_W 2
+#define INPUTATTR_FACING_W 3
+ uint32_t SwizzleSelect;
+ uint32_t SourceAttribute;
+};
+
+static inline void
+GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->ComponentOverrideW, 15, 15) |
+ __gen_field(values->ComponentOverrideZ, 14, 14) |
+ __gen_field(values->ComponentOverrideY, 13, 13) |
+ __gen_field(values->ComponentOverrideX, 12, 12) |
+ __gen_field(values->SwizzleControlMode, 11, 11) |
+ __gen_field(values->ConstantSource, 9, 10) |
+ __gen_field(values->SwizzleSelect, 6, 7) |
+ __gen_field(values->SourceAttribute, 0, 4) |
+ 0;
+
+}
+
struct GEN8_3DSTATE_SBE_SWIZ {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t Attribute;
+ struct GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL Attribute;
uint32_t Attribute15WrapShortestEnables;
uint32_t Attribute14WrapShortestEnables;
uint32_t Attribute13WrapShortestEnables;
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_Attribute;
+ GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &dw_Attribute, &values->Attribute);
dw[1] =
- /* Struct Attribute: found SF_OUTPUT_ATTRIBUTE_DETAIL */
+ /* Struct Attribute (0..15): */
+ __gen_field(dw_Attribute, 0, 15) |
0;
+ GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &dw[1], &values->Attribute);
dw[9] =
__gen_field(values->Attribute15WrapShortestEnables, 60, 63) |
__gen_field(values->Attribute14WrapShortestEnables, 56, 59) |
uint32_t DwordLength;
uint32_t SOBufferEnable;
uint32_t SOBufferIndex;
- uint32_t SOBufferObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE SOBufferObjectControlState;
uint32_t StreamOffsetWriteEnable;
uint32_t StreamOutputBufferOffsetAddressEnable;
__gen_address_type SurfaceBaseAddress;
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_SOBufferObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SOBufferObjectControlState, &values->SOBufferObjectControlState);
dw[1] =
__gen_field(values->SOBufferEnable, 31, 31) |
__gen_field(values->SOBufferIndex, 29, 30) |
- /* Struct SOBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct SOBufferObjectControlState (22..28): */
+ __gen_field(dw_SOBufferObjectControlState, 22, 28) |
__gen_field(values->StreamOffsetWriteEnable, 21, 21) |
__gen_field(values->StreamOutputBufferOffsetAddressEnable, 20, 20) |
0;
._3DCommandOpcode = 1, \
._3DCommandSubOpcode = 23
+struct GEN8_SO_DECL {
+ uint32_t OutputBufferSlot;
+ uint32_t HoleFlag;
+ uint32_t RegisterIndex;
+ uint32_t ComponentMask;
+};
+
+static inline void
+GEN8_SO_DECL_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_SO_DECL * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->OutputBufferSlot, 12, 13) |
+ __gen_field(values->HoleFlag, 11, 11) |
+ __gen_field(values->RegisterIndex, 4, 9) |
+ __gen_field(values->ComponentMask, 0, 3) |
+ 0;
+
+}
+
+struct GEN8_SO_DECL_ENTRY {
+ struct GEN8_SO_DECL Stream3Decl;
+ struct GEN8_SO_DECL Stream2Decl;
+ struct GEN8_SO_DECL Stream1Decl;
+ struct GEN8_SO_DECL Stream0Decl;
+};
+
+static inline void
+GEN8_SO_DECL_ENTRY_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_SO_DECL_ENTRY * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ uint32_t dw_Stream3Decl;
+ GEN8_SO_DECL_pack(data, &dw_Stream3Decl, &values->Stream3Decl);
+ uint32_t dw_Stream2Decl;
+ GEN8_SO_DECL_pack(data, &dw_Stream2Decl, &values->Stream2Decl);
+ uint32_t dw_Stream1Decl;
+ GEN8_SO_DECL_pack(data, &dw_Stream1Decl, &values->Stream1Decl);
+ uint32_t dw_Stream0Decl;
+ GEN8_SO_DECL_pack(data, &dw_Stream0Decl, &values->Stream0Decl);
+ dw[0] =
+ /* Struct Stream3Decl (48..63): */
+ __gen_field(dw_Stream3Decl, 48, 63) |
+ /* Struct Stream2Decl (32..47): */
+ __gen_field(dw_Stream2Decl, 32, 47) |
+ /* Struct Stream1Decl (16..31): */
+ __gen_field(dw_Stream1Decl, 16, 31) |
+ /* Struct Stream0Decl (0..15): */
+ __gen_field(dw_Stream0Decl, 0, 15) |
+ 0;
+
+ GEN8_SO_DECL_pack(data, &dw[0], &values->Stream0Decl);
+}
+
struct GEN8_3DSTATE_SO_DECL_LIST {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
uint32_t StencilBufferEnable;
- uint32_t StencilBufferObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE StencilBufferObjectControlState;
uint32_t SurfacePitch;
__gen_address_type SurfaceBaseAddress;
uint32_t SurfaceQPitch;
__gen_field(values->DwordLength, 0, 7) |
0;
+ uint32_t dw_StencilBufferObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StencilBufferObjectControlState, &values->StencilBufferObjectControlState);
dw[1] =
__gen_field(values->StencilBufferEnable, 31, 31) |
- /* Struct StencilBufferObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct StencilBufferObjectControlState (22..28): */
+ __gen_field(dw_StencilBufferObjectControlState, 22, 28) |
__gen_field(values->SurfacePitch, 0, 16) |
0;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 8
+struct GEN8_VERTEX_BUFFER_STATE {
+ uint32_t VertexBufferIndex;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState;
+ uint32_t AddressModifyEnable;
+ uint32_t NullVertexBuffer;
+ uint32_t BufferPitch;
+ __gen_address_type BufferStartingAddress;
+ uint32_t BufferSize;
+};
+
+static inline void
+GEN8_VERTEX_BUFFER_STATE_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_VERTEX_BUFFER_STATE * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ uint32_t dw_MemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState);
+ dw[0] =
+ __gen_field(values->VertexBufferIndex, 26, 31) |
+ /* Struct MemoryObjectControlState (16..22): */
+ __gen_field(dw_MemoryObjectControlState, 16, 22) |
+ __gen_field(values->AddressModifyEnable, 14, 14) |
+ __gen_field(values->NullVertexBuffer, 13, 13) |
+ __gen_field(values->BufferPitch, 0, 11) |
+ 0;
+
+ uint32_t dw1 =
+ 0;
+
+ dw[1] =
+ __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1);
+
+ dw[3] =
+ __gen_field(values->BufferSize, 0, 31) |
+ 0;
+
+}
+
struct GEN8_3DSTATE_VERTEX_BUFFERS {
uint32_t CommandType;
uint32_t CommandSubType;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 9
-struct GEN8_3DSTATE_VERTEX_ELEMENTS {
- uint32_t CommandType;
- uint32_t CommandSubType;
- uint32_t _3DCommandOpcode;
+struct GEN8_VERTEX_ELEMENT_STATE {
+ uint32_t VertexBufferIndex;
+ uint32_t Valid;
+ uint32_t SourceElementFormat;
+ uint32_t EdgeFlagEnable;
+ uint32_t SourceElementOffset;
+ uint32_t Component0Control;
+ uint32_t Component1Control;
+ uint32_t Component2Control;
+ uint32_t Component3Control;
+};
+
+static inline void
+GEN8_VERTEX_ELEMENT_STATE_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_VERTEX_ELEMENT_STATE * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->VertexBufferIndex, 26, 31) |
+ __gen_field(values->Valid, 25, 25) |
+ __gen_field(values->SourceElementFormat, 16, 24) |
+ __gen_field(values->EdgeFlagEnable, 15, 15) |
+ __gen_field(values->SourceElementOffset, 0, 11) |
+ 0;
+
+ dw[1] =
+ __gen_field(values->Component0Control, 28, 30) |
+ __gen_field(values->Component1Control, 24, 26) |
+ __gen_field(values->Component2Control, 20, 22) |
+ __gen_field(values->Component3Control, 16, 18) |
+ 0;
+
+}
+
+struct GEN8_3DSTATE_VERTEX_ELEMENTS {
+ uint32_t CommandType;
+ uint32_t CommandSubType;
+ uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
/* variable length fields follow */
}
-struct GEN8_3DSTATE_CONSTANT_BODY {
- uint32_t ConstantBuffer1ReadLength;
- uint32_t ConstantBuffer0ReadLength;
- uint32_t ConstantBuffer3ReadLength;
- uint32_t ConstantBuffer2ReadLength;
- __gen_address_type PointerToConstantBuffer0;
- __gen_address_type PointerToConstantBuffer1;
- __gen_address_type PointerToConstantBuffer2;
- __gen_address_type PointerToConstantBuffer3;
-};
-
-static inline void
-GEN8_3DSTATE_CONSTANT_BODY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_CONSTANT_BODY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->ConstantBuffer1ReadLength, 16, 31) |
- __gen_field(values->ConstantBuffer0ReadLength, 0, 15) |
- 0;
-
- dw[1] =
- __gen_field(values->ConstantBuffer3ReadLength, 16, 31) |
- __gen_field(values->ConstantBuffer2ReadLength, 0, 15) |
- 0;
-
- uint32_t dw2 =
- 0;
-
- dw[2] =
- __gen_combine_address(data, &dw[2], values->PointerToConstantBuffer0, dw2);
-
- uint32_t dw4 =
- 0;
-
- dw[4] =
- __gen_combine_address(data, &dw[4], values->PointerToConstantBuffer1, dw4);
-
- uint32_t dw6 =
- 0;
-
- dw[6] =
- __gen_combine_address(data, &dw[6], values->PointerToConstantBuffer2, dw6);
-
- uint32_t dw8 =
- 0;
-
- dw[8] =
- __gen_combine_address(data, &dw[8], values->PointerToConstantBuffer3, dw8);
-
-}
-
-struct GEN8_BINDING_TABLE_EDIT_ENTRY {
- uint32_t BindingTableIndex;
- uint32_t SurfaceStatePointer;
-};
-
-static inline void
-GEN8_BINDING_TABLE_EDIT_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_BINDING_TABLE_EDIT_ENTRY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->BindingTableIndex, 16, 23) |
- __gen_offset(values->SurfaceStatePointer, 0, 15) |
- 0;
-
-}
-
-struct GEN8_GATHER_CONSTANT_ENTRY {
- uint32_t ConstantBufferOffset;
- uint32_t ChannelMask;
- uint32_t BindingTableIndexOffset;
-};
-
-static inline void
-GEN8_GATHER_CONSTANT_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_GATHER_CONSTANT_ENTRY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_offset(values->ConstantBufferOffset, 8, 15) |
- __gen_field(values->ChannelMask, 4, 7) |
- __gen_field(values->BindingTableIndexOffset, 0, 3) |
- 0;
-
-}
-
-struct GEN8_VERTEX_BUFFER_STATE {
- uint32_t VertexBufferIndex;
- uint32_t MemoryObjectControlState;
- uint32_t AddressModifyEnable;
- uint32_t NullVertexBuffer;
- uint32_t BufferPitch;
- __gen_address_type BufferStartingAddress;
- uint32_t BufferSize;
-};
-
-static inline void
-GEN8_VERTEX_BUFFER_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_VERTEX_BUFFER_STATE * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->VertexBufferIndex, 26, 31) |
- /* Struct MemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
- __gen_field(values->AddressModifyEnable, 14, 14) |
- __gen_field(values->NullVertexBuffer, 13, 13) |
- __gen_field(values->BufferPitch, 0, 11) |
- 0;
-
- uint32_t dw1 =
- 0;
-
- dw[1] =
- __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1);
-
- dw[3] =
- __gen_field(values->BufferSize, 0, 31) |
- 0;
-
-}
-
-struct GEN8_VERTEX_ELEMENT_STATE {
- uint32_t VertexBufferIndex;
- uint32_t Valid;
- uint32_t SourceElementFormat;
- uint32_t EdgeFlagEnable;
- uint32_t SourceElementOffset;
- uint32_t Component0Control;
- uint32_t Component1Control;
- uint32_t Component2Control;
- uint32_t Component3Control;
-};
-
-static inline void
-GEN8_VERTEX_ELEMENT_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_VERTEX_ELEMENT_STATE * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->VertexBufferIndex, 26, 31) |
- __gen_field(values->Valid, 25, 25) |
- __gen_field(values->SourceElementFormat, 16, 24) |
- __gen_field(values->EdgeFlagEnable, 15, 15) |
- __gen_field(values->SourceElementOffset, 0, 11) |
- 0;
-
- dw[1] =
- __gen_field(values->Component0Control, 28, 30) |
- __gen_field(values->Component1Control, 24, 26) |
- __gen_field(values->Component2Control, 20, 22) |
- __gen_field(values->Component3Control, 16, 18) |
- 0;
-
-}
-
-struct GEN8_SO_DECL_ENTRY {
- uint32_t Stream3Decl;
- uint32_t Stream2Decl;
- uint32_t Stream1Decl;
- uint32_t Stream0Decl;
-};
-
-static inline void
-GEN8_SO_DECL_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_SO_DECL_ENTRY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- /* Struct Stream3Decl: found SO_DECL */
- /* Struct Stream2Decl: found SO_DECL */
- /* Struct Stream1Decl: found SO_DECL */
- /* Struct Stream0Decl: found SO_DECL */
- 0;
-
-}
-
-struct GEN8_SO_DECL {
- uint32_t OutputBufferSlot;
- uint32_t HoleFlag;
- uint32_t RegisterIndex;
- uint32_t ComponentMask;
-};
-
-static inline void
-GEN8_SO_DECL_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_SO_DECL * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->OutputBufferSlot, 12, 13) |
- __gen_field(values->HoleFlag, 11, 11) |
- __gen_field(values->RegisterIndex, 4, 9) |
- __gen_field(values->ComponentMask, 0, 3) |
- 0;
-
-}
-
-struct GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL {
- uint32_t ComponentOverrideW;
- uint32_t ComponentOverrideZ;
- uint32_t ComponentOverrideY;
- uint32_t ComponentOverrideX;
- uint32_t SwizzleControlMode;
-#define CONST_0000 0
-#define CONST_0001_FLOAT 1
-#define CONST_1111_FLOAT 2
-#define PRIM_ID 3
- uint32_t ConstantSource;
-#define INPUTATTR 0
-#define INPUTATTR_FACING 1
-#define INPUTATTR_W 2
-#define INPUTATTR_FACING_W 3
- uint32_t SwizzleSelect;
- uint32_t SourceAttribute;
-};
-
-static inline void
-GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->ComponentOverrideW, 15, 15) |
- __gen_field(values->ComponentOverrideZ, 14, 14) |
- __gen_field(values->ComponentOverrideY, 13, 13) |
- __gen_field(values->ComponentOverrideX, 12, 12) |
- __gen_field(values->SwizzleControlMode, 11, 11) |
- __gen_field(values->ConstantSource, 9, 10) |
- __gen_field(values->SwizzleSelect, 6, 7) |
- __gen_field(values->SourceAttribute, 0, 4) |
- 0;
-
-}
-
struct GEN8_SCISSOR_RECT {
uint32_t ScissorRectangleYMin;
uint32_t ScissorRectangleXMin;
}
-struct GEN8_BLEND_STATE {
- uint32_t AlphaToCoverageEnable;
- uint32_t IndependentAlphaBlendEnable;
- uint32_t AlphaToOneEnable;
- uint32_t AlphaToCoverageDitherEnable;
- uint32_t AlphaTestEnable;
- uint32_t AlphaTestFunction;
- uint32_t ColorDitherEnable;
- uint32_t XDitherOffset;
- uint32_t YDitherOffset;
- uint32_t Entry;
-};
-
-static inline void
-GEN8_BLEND_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_BLEND_STATE * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->AlphaToCoverageEnable, 31, 31) |
- __gen_field(values->IndependentAlphaBlendEnable, 30, 30) |
- __gen_field(values->AlphaToOneEnable, 29, 29) |
- __gen_field(values->AlphaToCoverageDitherEnable, 28, 28) |
- __gen_field(values->AlphaTestEnable, 27, 27) |
- __gen_field(values->AlphaTestFunction, 24, 26) |
- __gen_field(values->ColorDitherEnable, 23, 23) |
- __gen_field(values->XDitherOffset, 21, 22) |
- __gen_field(values->YDitherOffset, 19, 20) |
- 0;
-
- dw[1] =
- /* Struct Entry: found BLEND_STATE_ENTRY */
- 0;
-
-}
-
struct GEN8_BLEND_STATE_ENTRY {
uint32_t LogicOpEnable;
uint32_t LogicOpFunction;
}
+struct GEN8_BLEND_STATE {
+ uint32_t AlphaToCoverageEnable;
+ uint32_t IndependentAlphaBlendEnable;
+ uint32_t AlphaToOneEnable;
+ uint32_t AlphaToCoverageDitherEnable;
+ uint32_t AlphaTestEnable;
+ uint32_t AlphaTestFunction;
+ uint32_t ColorDitherEnable;
+ uint32_t XDitherOffset;
+ uint32_t YDitherOffset;
+ struct GEN8_BLEND_STATE_ENTRY Entry;
+};
+
+static inline void
+GEN8_BLEND_STATE_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_BLEND_STATE * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->AlphaToCoverageEnable, 31, 31) |
+ __gen_field(values->IndependentAlphaBlendEnable, 30, 30) |
+ __gen_field(values->AlphaToOneEnable, 29, 29) |
+ __gen_field(values->AlphaToCoverageDitherEnable, 28, 28) |
+ __gen_field(values->AlphaTestEnable, 27, 27) |
+ __gen_field(values->AlphaTestFunction, 24, 26) |
+ __gen_field(values->ColorDitherEnable, 23, 23) |
+ __gen_field(values->XDitherOffset, 21, 22) |
+ __gen_field(values->YDitherOffset, 19, 20) |
+ 0;
+
+ GEN8_BLEND_STATE_ENTRY_pack(data, &dw[1], &values->Entry);
+}
+
struct GEN8_CC_VIEWPORT {
float MinimumDepth;
float MaximumDepth;
}
-struct GEN8_MEMORY_OBJECT_CONTROL_STATE {
-};
-
-static inline void
-GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MEMORY_OBJECT_CONTROL_STATE * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- 0;
-
-}
-
struct GEN8_VEB_DI_IECP_COMMAND_SURFACE_CONTROL_BITS {
#define UseCacheabilityControlsfrompagetableUCwithFenceifcoherentcycle 0
#define UncacheableUCnoncacheable 1
}
-struct GEN8_PALETTE_ENTRY {
- uint32_t Alpha;
- uint32_t Red;
- uint32_t Green;
- uint32_t Blue;
-};
-
-static inline void
-GEN8_PALETTE_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_PALETTE_ENTRY * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->Alpha, 24, 31) |
- __gen_field(values->Red, 16, 23) |
- __gen_field(values->Green, 8, 15) |
- __gen_field(values->Blue, 0, 7) |
- 0;
-
-}
-
struct GEN8_RENDER_SURFACE_STATE {
#define SURFTYPE_1D 0
#define SURFTYPE_2D 1
uint32_t CubeFaceEnableNegativeY;
uint32_t CubeFaceEnablePositiveX;
uint32_t CubeFaceEnableNegativeX;
- uint32_t MemoryObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState;
uint32_t BaseMipLevel;
uint32_t SurfaceQPitch;
uint32_t Height;
__gen_field(values->CubeFaceEnableNegativeX, 5, 5) |
0;
+ uint32_t dw_MemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState);
dw[1] =
- /* Struct MemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ /* Struct MemoryObjectControlState (24..30): */
+ __gen_field(dw_MemoryObjectControlState, 24, 30) |
__gen_field(values->BaseMipLevel, 19, 23) |
__gen_field(values->SurfaceQPitch, 0, 14) |
0;