#include <stdio.h>
#include <assert.h>
+#ifndef __gen_validate_value
+#define __gen_validate_value(x)
+#endif
+
#ifndef __gen_field_functions
#define __gen_field_functions
uint32_t dw;
};
+static inline uint64_t
+__gen_mbo(uint32_t start, uint32_t end)
+{
+ return (~0ul >> (64 - (end - start + 1))) << start;
+}
+
static inline uint64_t
__gen_field(uint64_t v, uint32_t start, uint32_t end)
{
+ __gen_validate_value(v);
#if DEBUG
if (end - start + 1 < 64)
assert(v < 1ul << (end - start + 1));
static inline uint64_t
__gen_offset(uint64_t v, uint32_t start, uint32_t end)
{
+ __gen_validate_value(v);
#if DEBUG
uint64_t mask = (~0ul >> (64 - (end - start + 1))) << start;
static inline uint32_t
__gen_float(float v)
{
+ __gen_validate_value(v);
return ((union __gen_value) { .f = (v) }).dw;
}
#endif
-#define GEN8_3DSTATE_URB_VS_length 0x00000002
#define GEN8_3DSTATE_URB_VS_length_bias 0x00000002
#define GEN8_3DSTATE_URB_VS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 48, \
.DwordLength = 0
+#define GEN8_3DSTATE_URB_VS_length 0x00000002
+
struct GEN8_3DSTATE_URB_VS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_URB_VS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_URB_VS * restrict values)
+ const struct GEN8_3DSTATE_URB_VS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_VS_length 0x00000009
#define GEN8_3DSTATE_VS_length_bias 0x00000002
#define GEN8_3DSTATE_VS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 16, \
.DwordLength = 7
+#define GEN8_3DSTATE_VS_length 0x00000009
+
struct GEN8_3DSTATE_VS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t KernelStartPointer;
+ uint64_t KernelStartPointer;
#define Multiple 0
#define Single 1
uint32_t SingleVertexDispatch;
#define IEEE754 0
#define Alternate 1
uint32_t FloatingPointMode;
- uint32_t IllegalOpcodeExceptionEnable;
- uint32_t AccessesUAV;
- uint32_t SoftwareExceptionEnable;
- uint32_t ScratchSpaceBasePointer;
+ bool IllegalOpcodeExceptionEnable;
+ bool AccessesUAV;
+ bool SoftwareExceptionEnable;
+ uint64_t ScratchSpaceBasePointer;
uint32_t PerThreadScratchSpace;
uint32_t DispatchGRFStartRegisterForURBData;
uint32_t VertexURBEntryReadLength;
uint32_t VertexURBEntryReadOffset;
uint32_t MaximumNumberofThreads;
- uint32_t StatisticsEnable;
- uint32_t SIMD8DispatchEnable;
- uint32_t VertexCacheDisable;
- uint32_t FunctionEnable;
+ bool StatisticsEnable;
+ bool SIMD8DispatchEnable;
+ bool VertexCacheDisable;
+ bool FunctionEnable;
uint32_t VertexURBEntryOutputReadOffset;
uint32_t VertexURBEntryOutputLength;
uint32_t UserClipDistanceClipTestEnableBitmask;
static inline void
GEN8_3DSTATE_VS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_VS * restrict values)
+ const struct GEN8_3DSTATE_VS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_offset(values->KernelStartPointer, 6, 63) |
0;
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
dw[3] =
__gen_field(values->SingleVertexDispatch, 31, 31) |
__gen_field(values->VectorMaskEnable, 30, 30) |
__gen_field(values->SoftwareExceptionEnable, 7, 7) |
0;
- dw[4] =
+ uint64_t qw4 =
__gen_offset(values->ScratchSpaceBasePointer, 10, 63) |
__gen_field(values->PerThreadScratchSpace, 0, 3) |
0;
+ dw[4] = qw4;
+ dw[5] = qw4 >> 32;
+
dw[6] =
__gen_field(values->DispatchGRFStartRegisterForURBData, 20, 24) |
__gen_field(values->VertexURBEntryReadLength, 11, 16) |
}
-#define GEN8_GPGPU_CSR_BASE_ADDRESS_length 0x00000003
#define GEN8_GPGPU_CSR_BASE_ADDRESS_length_bias 0x00000002
#define GEN8_GPGPU_CSR_BASE_ADDRESS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 4, \
.DwordLength = 1
+#define GEN8_GPGPU_CSR_BASE_ADDRESS_length 0x00000003
+
struct GEN8_GPGPU_CSR_BASE_ADDRESS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- __gen_address_type GPGPUCSRBaseAddressHigh;
+ __gen_address_type GPGPUCSRBaseAddress;
};
static inline void
GEN8_GPGPU_CSR_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_GPGPU_CSR_BASE_ADDRESS * restrict values)
+ const struct GEN8_GPGPU_CSR_BASE_ADDRESS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
uint32_t dw1 =
0;
- dw[1] =
- __gen_combine_address(data, &dw[1], values->GPGPUCSRBaseAddressHigh, dw1);
+ uint64_t qw1 =
+ __gen_combine_address(data, &dw[1], values->GPGPUCSRBaseAddress, dw1);
+
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
}
-#define GEN8_MI_ATOMIC_length 0x00000003
#define GEN8_MI_ATOMIC_length_bias 0x00000002
#define GEN8_MI_ATOMIC_header \
.CommandType = 0, \
.MICommandOpcode = 47
+#define GEN8_MI_ATOMIC_length 0x00000003
+
struct GEN8_MI_ATOMIC {
uint32_t CommandType;
uint32_t MICommandOpcode;
uint32_t ATOMICOPCODE;
uint32_t DwordLength;
__gen_address_type MemoryAddress;
- uint32_t MemoryAddressHigh;
uint32_t Operand1DataDword0;
uint32_t Operand2DataDword0;
uint32_t Operand1DataDword1;
static inline void
GEN8_MI_ATOMIC_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_ATOMIC * restrict values)
+ const struct GEN8_MI_ATOMIC * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
uint32_t dw1 =
0;
- dw[1] =
+ uint64_t qw1 =
__gen_combine_address(data, &dw[1], values->MemoryAddress, dw1);
- dw[2] =
- __gen_field(values->MemoryAddressHigh, 0, 15) |
- 0;
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
dw[3] =
__gen_field(values->Operand1DataDword0, 0, 31) |
}
-#define GEN8_MI_LOAD_REGISTER_REG_length 0x00000003
#define GEN8_MI_LOAD_REGISTER_REG_length_bias 0x00000002
#define GEN8_MI_LOAD_REGISTER_REG_header \
.CommandType = 0, \
.MICommandOpcode = 42, \
.DwordLength = 1
+#define GEN8_MI_LOAD_REGISTER_REG_length 0x00000003
+
struct GEN8_MI_LOAD_REGISTER_REG {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_LOAD_REGISTER_REG_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_LOAD_REGISTER_REG * restrict values)
+ const struct GEN8_MI_LOAD_REGISTER_REG * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
0;
dw[1] =
- __gen_field(values->SourceRegisterAddress, 2, 22) |
+ __gen_offset(values->SourceRegisterAddress, 2, 22) |
0;
dw[2] =
- __gen_field(values->DestinationRegisterAddress, 2, 22) |
+ __gen_offset(values->DestinationRegisterAddress, 2, 22) |
0;
}
-#define GEN8_MI_SEMAPHORE_SIGNAL_length 0x00000002
#define GEN8_MI_SEMAPHORE_SIGNAL_length_bias 0x00000002
#define GEN8_MI_SEMAPHORE_SIGNAL_header \
.CommandType = 0, \
.MICommandOpcode = 27, \
.DwordLength = 0
+#define GEN8_MI_SEMAPHORE_SIGNAL_length 0x00000002
+
struct GEN8_MI_SEMAPHORE_SIGNAL {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_SEMAPHORE_SIGNAL_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_SEMAPHORE_SIGNAL * restrict values)
+ const struct GEN8_MI_SEMAPHORE_SIGNAL * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_SEMAPHORE_WAIT_length 0x00000004
#define GEN8_MI_SEMAPHORE_WAIT_length_bias 0x00000002
#define GEN8_MI_SEMAPHORE_WAIT_header \
.CommandType = 0, \
.MICommandOpcode = 28, \
.DwordLength = 2
+#define GEN8_MI_SEMAPHORE_WAIT_length 0x00000004
+
struct GEN8_MI_SEMAPHORE_WAIT {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_SEMAPHORE_WAIT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_SEMAPHORE_WAIT * restrict values)
+ const struct GEN8_MI_SEMAPHORE_WAIT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->SemaphoreAddress, dw2);
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
+
}
-#define GEN8_MI_STORE_REGISTER_MEM_length 0x00000004
#define GEN8_MI_STORE_REGISTER_MEM_length_bias 0x00000002
#define GEN8_MI_STORE_REGISTER_MEM_header \
.CommandType = 0, \
.MICommandOpcode = 36, \
.DwordLength = 2
+#define GEN8_MI_STORE_REGISTER_MEM_length 0x00000004
+
struct GEN8_MI_STORE_REGISTER_MEM {
uint32_t CommandType;
uint32_t MICommandOpcode;
- uint32_t UseGlobalGTT;
+ bool UseGlobalGTT;
uint32_t PredicateEnable;
uint32_t DwordLength;
uint32_t RegisterAddress;
static inline void
GEN8_MI_STORE_REGISTER_MEM_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_STORE_REGISTER_MEM * restrict values)
+ const struct GEN8_MI_STORE_REGISTER_MEM * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
0;
dw[1] =
- __gen_field(values->RegisterAddress, 2, 22) |
+ __gen_offset(values->RegisterAddress, 2, 22) |
0;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->MemoryAddress, dw2);
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
+
}
-#define GEN8_PIPELINE_SELECT_length 0x00000001
#define GEN8_PIPELINE_SELECT_length_bias 0x00000001
#define GEN8_PIPELINE_SELECT_header \
.CommandType = 3, \
._3DCommandOpcode = 1, \
._3DCommandSubOpcode = 4
+#define GEN8_PIPELINE_SELECT_length 0x00000001
+
struct GEN8_PIPELINE_SELECT {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_PIPELINE_SELECT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_PIPELINE_SELECT * restrict values)
+ const struct GEN8_PIPELINE_SELECT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_STATE_BASE_ADDRESS_length 0x00000010
#define GEN8_STATE_BASE_ADDRESS_length_bias 0x00000002
#define GEN8_STATE_BASE_ADDRESS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 1, \
.DwordLength = 14
+#define GEN8_STATE_BASE_ADDRESS_length 0x00000010
+
+#define GEN8_MEMORY_OBJECT_CONTROL_STATE_length 0x00000001
+
+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;
- uint32_t GeneralStateBaseAddressModifyEnable;
- uint32_t StatelessDataPortAccessMemoryObjectControlState;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE GeneralStateMemoryObjectControlState;
+ bool GeneralStateBaseAddressModifyEnable;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE StatelessDataPortAccessMemoryObjectControlState;
__gen_address_type SurfaceStateBaseAddress;
- uint32_t SurfaceStateMemoryObjectControlState;
- uint32_t SurfaceStateBaseAddressModifyEnable;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE SurfaceStateMemoryObjectControlState;
+ bool SurfaceStateBaseAddressModifyEnable;
__gen_address_type DynamicStateBaseAddress;
- uint32_t DynamicStateMemoryObjectControlState;
- uint32_t DynamicStateBaseAddressModifyEnable;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE DynamicStateMemoryObjectControlState;
+ bool DynamicStateBaseAddressModifyEnable;
__gen_address_type IndirectObjectBaseAddress;
- uint32_t IndirectObjectMemoryObjectControlState;
- uint32_t IndirectObjectBaseAddressModifyEnable;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE IndirectObjectMemoryObjectControlState;
+ bool IndirectObjectBaseAddressModifyEnable;
__gen_address_type InstructionBaseAddress;
- uint32_t InstructionMemoryObjectControlState;
- uint32_t InstructionBaseAddressModifyEnable;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE InstructionMemoryObjectControlState;
+ bool InstructionBaseAddressModifyEnable;
uint32_t GeneralStateBufferSize;
- uint32_t GeneralStateBufferSizeModifyEnable;
+ bool GeneralStateBufferSizeModifyEnable;
uint32_t DynamicStateBufferSize;
- uint32_t DynamicStateBufferSizeModifyEnable;
+ bool DynamicStateBufferSizeModifyEnable;
uint32_t IndirectObjectBufferSize;
- uint32_t IndirectObjectBufferSizeModifyEnable;
+ bool IndirectObjectBufferSizeModifyEnable;
uint32_t InstructionBufferSize;
- uint32_t InstructionBuffersizeModifyEnable;
+ bool InstructionBuffersizeModifyEnable;
};
static inline void
GEN8_STATE_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_STATE_BASE_ADDRESS * restrict values)
+ const struct GEN8_STATE_BASE_ADDRESS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__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 */
+ __gen_field(dw_GeneralStateMemoryObjectControlState, 4, 10) |
__gen_field(values->GeneralStateBaseAddressModifyEnable, 0, 0) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_combine_address(data, &dw[1], values->GeneralStateBaseAddress, dw1);
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
+ uint32_t dw_StatelessDataPortAccessMemoryObjectControlState;
+ GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StatelessDataPortAccessMemoryObjectControlState, &values->StatelessDataPortAccessMemoryObjectControlState);
dw[3] =
- /* Struct StatelessDataPortAccessMemoryObjectControlState: found MEMORY_OBJECT_CONTROL_STATE */
+ __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 */
+ __gen_field(dw_SurfaceStateMemoryObjectControlState, 4, 10) |
__gen_field(values->SurfaceStateBaseAddressModifyEnable, 0, 0) |
0;
- dw[4] =
+ uint64_t qw4 =
__gen_combine_address(data, &dw[4], values->SurfaceStateBaseAddress, dw4);
+ dw[4] = qw4;
+ dw[5] = qw4 >> 32;
+
+ 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 */
+ __gen_field(dw_DynamicStateMemoryObjectControlState, 4, 10) |
__gen_field(values->DynamicStateBaseAddressModifyEnable, 0, 0) |
0;
- dw[6] =
+ uint64_t qw6 =
__gen_combine_address(data, &dw[6], values->DynamicStateBaseAddress, dw6);
+ dw[6] = qw6;
+ dw[7] = qw6 >> 32;
+
+ 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 */
+ __gen_field(dw_IndirectObjectMemoryObjectControlState, 4, 10) |
__gen_field(values->IndirectObjectBaseAddressModifyEnable, 0, 0) |
0;
- dw[8] =
+ uint64_t qw8 =
__gen_combine_address(data, &dw[8], values->IndirectObjectBaseAddress, dw8);
+ dw[8] = qw8;
+ dw[9] = qw8 >> 32;
+
+ 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 */
+ __gen_field(dw_InstructionMemoryObjectControlState, 4, 10) |
__gen_field(values->InstructionBaseAddressModifyEnable, 0, 0) |
0;
- dw[10] =
+ uint64_t qw10 =
__gen_combine_address(data, &dw[10], values->InstructionBaseAddress, dw10);
+ dw[10] = qw10;
+ dw[11] = qw10 >> 32;
+
dw[12] =
__gen_field(values->GeneralStateBufferSize, 12, 31) |
__gen_field(values->GeneralStateBufferSizeModifyEnable, 0, 0) |
}
-#define GEN8_STATE_PREFETCH_length 0x00000002
#define GEN8_STATE_PREFETCH_length_bias 0x00000002
#define GEN8_STATE_PREFETCH_header \
.CommandType = 3, \
._3DCommandSubOpcode = 3, \
.DwordLength = 0
+#define GEN8_STATE_PREFETCH_length 0x00000002
+
struct GEN8_STATE_PREFETCH {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_STATE_PREFETCH_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_STATE_PREFETCH * restrict values)
+ const struct GEN8_STATE_PREFETCH * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_STATE_SIP_length 0x00000003
#define GEN8_STATE_SIP_length_bias 0x00000002
#define GEN8_STATE_SIP_header \
.CommandType = 3, \
._3DCommandSubOpcode = 2, \
.DwordLength = 1
+#define GEN8_STATE_SIP_length 0x00000003
+
struct GEN8_STATE_SIP {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t SystemInstructionPointer;
+ uint64_t SystemInstructionPointer;
};
static inline void
GEN8_STATE_SIP_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_STATE_SIP * restrict values)
+ const struct GEN8_STATE_SIP * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_offset(values->SystemInstructionPointer, 4, 63) |
0;
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
}
-#define GEN8_SWTESS_BASE_ADDRESS_length 0x00000002
#define GEN8_SWTESS_BASE_ADDRESS_length_bias 0x00000002
#define GEN8_SWTESS_BASE_ADDRESS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 3, \
.DwordLength = 0
+#define GEN8_SWTESS_BASE_ADDRESS_length 0x00000002
+
struct GEN8_SWTESS_BASE_ADDRESS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
__gen_address_type SWTessellationBaseAddress;
- uint32_t SWTessellationMemoryObjectControlState;
- __gen_address_type SWTessellationBaseAddressHigh;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE SWTessellationMemoryObjectControlState;
};
static inline void
GEN8_SWTESS_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_SWTESS_BASE_ADDRESS * restrict values)
+ const struct GEN8_SWTESS_BASE_ADDRESS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__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 */
+ __gen_field(dw_SWTessellationMemoryObjectControlState, 8, 11) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_combine_address(data, &dw[1], values->SWTessellationBaseAddress, dw1);
- uint32_t dw2 =
- 0;
-
- dw[2] =
- __gen_combine_address(data, &dw[2], values->SWTessellationBaseAddressHigh, dw2);
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
}
-#define GEN8_3DPRIMITIVE_length 0x00000007
#define GEN8_3DPRIMITIVE_length_bias 0x00000002
#define GEN8_3DPRIMITIVE_header \
.CommandType = 3, \
._3DCommandSubOpcode = 0, \
.DwordLength = 5
+#define GEN8_3DPRIMITIVE_length 0x00000007
+
struct GEN8_3DPRIMITIVE {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
- uint32_t IndirectParameterEnable;
+ bool IndirectParameterEnable;
uint32_t UAVCoherencyRequired;
- uint32_t PredicateEnable;
+ bool PredicateEnable;
uint32_t DwordLength;
- uint32_t EndOffsetEnable;
+ bool EndOffsetEnable;
#define SEQUENTIAL 0
#define RANDOM 1
uint32_t VertexAccessType;
static inline void
GEN8_3DPRIMITIVE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DPRIMITIVE * restrict values)
+ const struct GEN8_3DPRIMITIVE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_AA_LINE_PARAMETERS_length 0x00000003
#define GEN8_3DSTATE_AA_LINE_PARAMETERS_length_bias 0x00000002
#define GEN8_3DSTATE_AA_LINE_PARAMETERS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 10, \
.DwordLength = 1
+#define GEN8_3DSTATE_AA_LINE_PARAMETERS_length 0x00000003
+
struct GEN8_3DSTATE_AA_LINE_PARAMETERS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t AAPointCoverageBias;
- uint32_t AACoverageBias;
- uint32_t AAPointCoverageSlope;
- uint32_t AACoverageSlope;
- uint32_t AAPointCoverageEndCapBias;
- uint32_t AACoverageEndCapBias;
- uint32_t AAPointCoverageEndCapSlope;
- uint32_t AACoverageEndCapSlope;
+ float AAPointCoverageBias;
+ float AACoverageBias;
+ float AAPointCoverageSlope;
+ float AACoverageSlope;
+ float AAPointCoverageEndCapBias;
+ float AACoverageEndCapBias;
+ float AAPointCoverageEndCapSlope;
+ float AACoverageEndCapSlope;
};
static inline void
GEN8_3DSTATE_AA_LINE_PARAMETERS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_AA_LINE_PARAMETERS * restrict values)
+ const struct GEN8_3DSTATE_AA_LINE_PARAMETERS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
0;
dw[1] =
- __gen_field(values->AAPointCoverageBias, 24, 31) |
- __gen_field(values->AACoverageBias, 16, 23) |
- __gen_field(values->AAPointCoverageSlope, 8, 15) |
- __gen_field(values->AACoverageSlope, 0, 7) |
+ __gen_field(values->AAPointCoverageBias * (1 << 8), 24, 31) |
+ __gen_field(values->AACoverageBias * (1 << 8), 16, 23) |
+ __gen_field(values->AAPointCoverageSlope * (1 << 8), 8, 15) |
+ __gen_field(values->AACoverageSlope * (1 << 8), 0, 7) |
0;
dw[2] =
- __gen_field(values->AAPointCoverageEndCapBias, 24, 31) |
- __gen_field(values->AACoverageEndCapBias, 16, 23) |
- __gen_field(values->AAPointCoverageEndCapSlope, 8, 15) |
- __gen_field(values->AACoverageEndCapSlope, 0, 7) |
+ __gen_field(values->AAPointCoverageEndCapBias * (1 << 8), 24, 31) |
+ __gen_field(values->AACoverageEndCapBias * (1 << 8), 16, 23) |
+ __gen_field(values->AAPointCoverageEndCapSlope * (1 << 8), 8, 15) |
+ __gen_field(values->AACoverageEndCapSlope * (1 << 8), 0, 7) |
0;
}
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 70
+#define GEN8_3DSTATE_BINDING_TABLE_EDIT_DS_length 0x00000000
+
+#define GEN8_BINDING_TABLE_EDIT_ENTRY_length 0x00000001
+
+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;
static inline void
GEN8_3DSTATE_BINDING_TABLE_EDIT_DS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_DS * restrict values)
+ const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_DS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 68
+#define GEN8_3DSTATE_BINDING_TABLE_EDIT_GS_length 0x00000000
+
struct GEN8_3DSTATE_BINDING_TABLE_EDIT_GS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_BINDING_TABLE_EDIT_GS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_GS * restrict values)
+ const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_GS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 69
+#define GEN8_3DSTATE_BINDING_TABLE_EDIT_HS_length 0x00000000
+
struct GEN8_3DSTATE_BINDING_TABLE_EDIT_HS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_BINDING_TABLE_EDIT_HS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_HS * restrict values)
+ const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_HS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 71
+#define GEN8_3DSTATE_BINDING_TABLE_EDIT_PS_length 0x00000000
+
struct GEN8_3DSTATE_BINDING_TABLE_EDIT_PS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_BINDING_TABLE_EDIT_PS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_PS * restrict values)
+ const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_PS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 67
+#define GEN8_3DSTATE_BINDING_TABLE_EDIT_VS_length 0x00000000
+
struct GEN8_3DSTATE_BINDING_TABLE_EDIT_VS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_BINDING_TABLE_EDIT_VS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_VS * restrict values)
+ const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_VS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
/* variable length fields follow */
}
-#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS_length 0x00000002
#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS_length_bias 0x00000002
#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 40, \
.DwordLength = 0
+#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS_length 0x00000002
+
struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS * restrict values)
+ const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS_length 0x00000002
#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS_length_bias 0x00000002
#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 41, \
.DwordLength = 0
+#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS_length 0x00000002
+
struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS * restrict values)
+ const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS_length 0x00000002
#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS_length_bias 0x00000002
#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 39, \
.DwordLength = 0
+#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS_length 0x00000002
+
struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS * restrict values)
+ const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS_length 0x00000002
#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS_length_bias 0x00000002
#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 42, \
.DwordLength = 0
+#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS_length 0x00000002
+
struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS * restrict values)
+ const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS_length 0x00000002
#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS_length_bias 0x00000002
#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 38, \
.DwordLength = 0
+#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS_length 0x00000002
+
struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS * restrict values)
+ const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC_length 0x00000004
#define GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC_length_bias 0x00000002
#define GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC_header\
.CommandType = 3, \
._3DCommandSubOpcode = 25, \
.DwordLength = 2
+#define GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC_length 0x00000004
+
struct GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC {
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;
};
static inline void
GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC * restrict values)
+ const struct GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__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 */
+ __gen_field(dw_SurfaceObjectControlState, 0, 6) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_combine_address(data, &dw[1], values->BindingTablePoolBaseAddress, dw1);
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
dw[3] =
__gen_field(values->BindingTablePoolBufferSize, 12, 31) |
0;
}
-#define GEN8_3DSTATE_BLEND_STATE_POINTERS_length 0x00000002
#define GEN8_3DSTATE_BLEND_STATE_POINTERS_length_bias 0x00000002
#define GEN8_3DSTATE_BLEND_STATE_POINTERS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 36, \
.DwordLength = 0
+#define GEN8_3DSTATE_BLEND_STATE_POINTERS_length 0x00000002
+
struct GEN8_3DSTATE_BLEND_STATE_POINTERS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
uint32_t BlendStatePointer;
- uint32_t BlendStatePointerValid;
+ bool BlendStatePointerValid;
};
static inline void
GEN8_3DSTATE_BLEND_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_BLEND_STATE_POINTERS * restrict values)
+ const struct GEN8_3DSTATE_BLEND_STATE_POINTERS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_CC_STATE_POINTERS_length 0x00000002
#define GEN8_3DSTATE_CC_STATE_POINTERS_length_bias 0x00000002
#define GEN8_3DSTATE_CC_STATE_POINTERS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 14, \
.DwordLength = 0
+#define GEN8_3DSTATE_CC_STATE_POINTERS_length 0x00000002
+
struct GEN8_3DSTATE_CC_STATE_POINTERS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
uint32_t ColorCalcStatePointer;
- uint32_t ColorCalcStatePointerValid;
+ bool ColorCalcStatePointerValid;
};
static inline void
GEN8_3DSTATE_CC_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_CC_STATE_POINTERS * restrict values)
+ const struct GEN8_3DSTATE_CC_STATE_POINTERS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_CHROMA_KEY_length 0x00000004
#define GEN8_3DSTATE_CHROMA_KEY_length_bias 0x00000002
#define GEN8_3DSTATE_CHROMA_KEY_header \
.CommandType = 3, \
._3DCommandSubOpcode = 4, \
.DwordLength = 2
+#define GEN8_3DSTATE_CHROMA_KEY_length 0x00000004
+
struct GEN8_3DSTATE_CHROMA_KEY {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_CHROMA_KEY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_CHROMA_KEY * restrict values)
+ const struct GEN8_3DSTATE_CHROMA_KEY * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_CLEAR_PARAMS_length 0x00000003
#define GEN8_3DSTATE_CLEAR_PARAMS_length_bias 0x00000002
#define GEN8_3DSTATE_CLEAR_PARAMS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 4, \
.DwordLength = 1
+#define GEN8_3DSTATE_CLEAR_PARAMS_length 0x00000003
+
struct GEN8_3DSTATE_CLEAR_PARAMS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
float DepthClearValue;
- uint32_t DepthClearValueValid;
+ bool DepthClearValueValid;
};
static inline void
GEN8_3DSTATE_CLEAR_PARAMS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_CLEAR_PARAMS * restrict values)
+ const struct GEN8_3DSTATE_CLEAR_PARAMS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_CLIP_length 0x00000004
#define GEN8_3DSTATE_CLIP_length_bias 0x00000002
#define GEN8_3DSTATE_CLIP_header \
.CommandType = 3, \
._3DCommandSubOpcode = 18, \
.DwordLength = 2
+#define GEN8_3DSTATE_CLIP_length 0x00000004
+
struct GEN8_3DSTATE_CLIP {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t DwordLength;
#define Normal 0
#define Force 1
- uint32_t ForceUserClipDistanceCullTestEnableBitmask;
+ bool ForceUserClipDistanceCullTestEnableBitmask;
#define _8Bit 0
#define _4Bit 1
uint32_t VertexSubPixelPrecisionSelect;
- uint32_t EarlyCullEnable;
+ bool EarlyCullEnable;
#define Normal 0
#define Force 1
- uint32_t ForceUserClipDistanceClipTestEnableBitmask;
+ bool ForceUserClipDistanceClipTestEnableBitmask;
#define Normal 0
#define Force 1
- uint32_t ForceClipMode;
- uint32_t ClipperStatisticsEnable;
+ bool ForceClipMode;
+ bool ClipperStatisticsEnable;
uint32_t UserClipDistanceCullTestEnableBitmask;
- uint32_t ClipEnable;
+ bool ClipEnable;
#define API_OGL 0
uint32_t APIMode;
- uint32_t ViewportXYClipTestEnable;
- uint32_t GuardbandClipTestEnable;
+ bool ViewportXYClipTestEnable;
+ bool GuardbandClipTestEnable;
uint32_t UserClipDistanceClipTestEnableBitmask;
#define NORMAL 0
#define REJECT_ALL 3
#define ACCEPT_ALL 4
uint32_t ClipMode;
- uint32_t PerspectiveDivideDisable;
- uint32_t NonPerspectiveBarycentricEnable;
+ bool PerspectiveDivideDisable;
+ bool NonPerspectiveBarycentricEnable;
uint32_t TriangleStripListProvokingVertexSelect;
uint32_t LineStripListProvokingVertexSelect;
uint32_t TriangleFanProvokingVertexSelect;
- uint32_t MinimumPointWidth;
- uint32_t MaximumPointWidth;
- uint32_t ForceZeroRTAIndexEnable;
+ float MinimumPointWidth;
+ float MaximumPointWidth;
+ bool ForceZeroRTAIndexEnable;
uint32_t MaximumVPIndex;
};
static inline void
GEN8_3DSTATE_CLIP_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_CLIP * restrict values)
+ const struct GEN8_3DSTATE_CLIP * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
0;
dw[3] =
- __gen_field(values->MinimumPointWidth, 17, 27) |
- __gen_field(values->MaximumPointWidth, 6, 16) |
+ __gen_field(values->MinimumPointWidth * (1 << 3), 17, 27) |
+ __gen_field(values->MaximumPointWidth * (1 << 3), 6, 16) |
__gen_field(values->ForceZeroRTAIndexEnable, 5, 5) |
__gen_field(values->MaximumVPIndex, 0, 3) |
0;
}
-#define GEN8_3DSTATE_CONSTANT_DS_length 0x0000000b
#define GEN8_3DSTATE_CONSTANT_DS_length_bias 0x00000002
#define GEN8_3DSTATE_CONSTANT_DS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 26, \
.DwordLength = 9
+#define GEN8_3DSTATE_CONSTANT_DS_length 0x0000000b
+
+#define GEN8_3DSTATE_CONSTANT_BODY_length 0x0000000a
+
+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;
+
+ uint64_t qw2 =
+ __gen_combine_address(data, &dw[2], values->PointerToConstantBuffer0, dw2);
+
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
+
+ uint32_t dw4 =
+ 0;
+
+ uint64_t qw4 =
+ __gen_combine_address(data, &dw[4], values->PointerToConstantBuffer1, dw4);
+
+ dw[4] = qw4;
+ dw[5] = qw4 >> 32;
+
+ uint32_t dw6 =
+ 0;
+
+ uint64_t qw6 =
+ __gen_combine_address(data, &dw[6], values->PointerToConstantBuffer2, dw6);
+
+ dw[6] = qw6;
+ dw[7] = qw6 >> 32;
+
+ uint32_t dw8 =
+ 0;
+
+ uint64_t qw8 =
+ __gen_combine_address(data, &dw[8], values->PointerToConstantBuffer3, dw8);
+
+ dw[8] = qw8;
+ dw[9] = qw8 >> 32;
+
+}
+
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
GEN8_3DSTATE_CONSTANT_DS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_CONSTANT_DS * restrict values)
+ const struct GEN8_3DSTATE_CONSTANT_DS * restrict values)
{
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 */
+ __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
#define GEN8_3DSTATE_CONSTANT_GS_length_bias 0x00000002
#define GEN8_3DSTATE_CONSTANT_GS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 22, \
.DwordLength = 9
+#define GEN8_3DSTATE_CONSTANT_GS_length 0x0000000b
+
struct GEN8_3DSTATE_CONSTANT_GS {
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
GEN8_3DSTATE_CONSTANT_GS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_CONSTANT_GS * restrict values)
+ const struct GEN8_3DSTATE_CONSTANT_GS * restrict values)
{
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 */
+ __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
#define GEN8_3DSTATE_CONSTANT_HS_length_bias 0x00000002
#define GEN8_3DSTATE_CONSTANT_HS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 25, \
.DwordLength = 9
+#define GEN8_3DSTATE_CONSTANT_HS_length 0x0000000b
+
struct GEN8_3DSTATE_CONSTANT_HS {
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
GEN8_3DSTATE_CONSTANT_HS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_CONSTANT_HS * restrict values)
+ const struct GEN8_3DSTATE_CONSTANT_HS * restrict values)
{
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 */
+ __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
#define GEN8_3DSTATE_CONSTANT_PS_length_bias 0x00000002
#define GEN8_3DSTATE_CONSTANT_PS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 23, \
.DwordLength = 9
+#define GEN8_3DSTATE_CONSTANT_PS_length 0x0000000b
+
struct GEN8_3DSTATE_CONSTANT_PS {
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
GEN8_3DSTATE_CONSTANT_PS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_CONSTANT_PS * restrict values)
+ const struct GEN8_3DSTATE_CONSTANT_PS * restrict values)
{
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 */
+ __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
#define GEN8_3DSTATE_CONSTANT_VS_length_bias 0x00000002
#define GEN8_3DSTATE_CONSTANT_VS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 21, \
.DwordLength = 9
+#define GEN8_3DSTATE_CONSTANT_VS_length 0x0000000b
+
struct GEN8_3DSTATE_CONSTANT_VS {
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
GEN8_3DSTATE_CONSTANT_VS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_CONSTANT_VS * restrict values)
+ const struct GEN8_3DSTATE_CONSTANT_VS * restrict values)
{
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 */
+ __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
#define GEN8_3DSTATE_DEPTH_BUFFER_length_bias 0x00000002
#define GEN8_3DSTATE_DEPTH_BUFFER_header \
.CommandType = 3, \
._3DCommandSubOpcode = 5, \
.DwordLength = 6
+#define GEN8_3DSTATE_DEPTH_BUFFER_length 0x00000008
+
struct GEN8_3DSTATE_DEPTH_BUFFER {
uint32_t CommandType;
uint32_t CommandSubType;
#define SURFTYPE_CUBE 3
#define SURFTYPE_NULL 7
uint32_t SurfaceType;
- uint32_t DepthWriteEnable;
- uint32_t StencilWriteEnable;
- uint32_t HierarchicalDepthBufferEnable;
+ bool DepthWriteEnable;
+ bool StencilWriteEnable;
+ bool HierarchicalDepthBufferEnable;
#define D32_FLOAT 1
#define D24_UNORM_X8_UINT 3
#define D16_UNORM 5
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;
};
static inline void
GEN8_3DSTATE_DEPTH_BUFFER_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_DEPTH_BUFFER * restrict values)
+ const struct GEN8_3DSTATE_DEPTH_BUFFER * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2);
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
+
dw[4] =
__gen_field(values->Height, 18, 31) |
__gen_field(values->Width, 4, 17) |
__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 */
+ __gen_field(dw_DepthBufferObjectControlState, 0, 6) |
0;
dw[6] =
}
-#define GEN8_3DSTATE_DRAWING_RECTANGLE_length 0x00000004
#define GEN8_3DSTATE_DRAWING_RECTANGLE_length_bias 0x00000002
#define GEN8_3DSTATE_DRAWING_RECTANGLE_header \
.CommandType = 3, \
._3DCommandSubOpcode = 0, \
.DwordLength = 2
+#define GEN8_3DSTATE_DRAWING_RECTANGLE_length 0x00000004
+
struct GEN8_3DSTATE_DRAWING_RECTANGLE {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_DRAWING_RECTANGLE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_DRAWING_RECTANGLE * restrict values)
+ const struct GEN8_3DSTATE_DRAWING_RECTANGLE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_DS_length 0x00000009
#define GEN8_3DSTATE_DS_length_bias 0x00000002
#define GEN8_3DSTATE_DS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 29, \
.DwordLength = 7
+#define GEN8_3DSTATE_DS_length 0x00000009
+
struct GEN8_3DSTATE_DS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t KernelStartPointer;
+ uint64_t KernelStartPointer;
#define Multiple 0
#define Single 1
uint32_t SingleDomainPointDispatch;
#define IEEE754 0
#define Alternate 1
uint32_t FloatingPointMode;
- uint32_t AccessesUAV;
- uint32_t IllegalOpcodeExceptionEnable;
- uint32_t SoftwareExceptionEnable;
- uint32_t ScratchSpaceBasePointer;
+ bool AccessesUAV;
+ bool IllegalOpcodeExceptionEnable;
+ bool SoftwareExceptionEnable;
+ uint64_t ScratchSpaceBasePointer;
uint32_t PerThreadScratchSpace;
uint32_t DispatchGRFStartRegisterForURBData;
uint32_t PatchURBEntryReadLength;
uint32_t PatchURBEntryReadOffset;
uint32_t MaximumNumberofThreads;
- uint32_t StatisticsEnable;
- uint32_t SIMD8DispatchEnable;
- uint32_t ComputeWCoordinateEnable;
- uint32_t CacheDisable;
- uint32_t FunctionEnable;
+ bool StatisticsEnable;
+ bool SIMD8DispatchEnable;
+ bool ComputeWCoordinateEnable;
+ bool CacheDisable;
+ bool FunctionEnable;
uint32_t VertexURBEntryOutputReadOffset;
uint32_t VertexURBEntryOutputLength;
uint32_t UserClipDistanceClipTestEnableBitmask;
static inline void
GEN8_3DSTATE_DS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_DS * restrict values)
+ const struct GEN8_3DSTATE_DS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_offset(values->KernelStartPointer, 6, 63) |
0;
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
dw[3] =
__gen_field(values->SingleDomainPointDispatch, 31, 31) |
__gen_field(values->VectorMaskEnable, 30, 30) |
__gen_field(values->SoftwareExceptionEnable, 7, 7) |
0;
- dw[4] =
+ uint64_t qw4 =
__gen_offset(values->ScratchSpaceBasePointer, 10, 63) |
__gen_field(values->PerThreadScratchSpace, 0, 3) |
0;
+ dw[4] = qw4;
+ dw[5] = qw4 >> 32;
+
dw[6] =
__gen_field(values->DispatchGRFStartRegisterForURBData, 20, 24) |
__gen_field(values->PatchURBEntryReadLength, 11, 17) |
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 55
+#define GEN8_3DSTATE_GATHER_CONSTANT_DS_length 0x00000000
+
+#define GEN8_GATHER_CONSTANT_ENTRY_length 0x00000001
+
+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 ConstantBufferValid;
uint32_t ConstantBufferBindingTableBlock;
uint32_t GatherBufferOffset;
- uint32_t ConstantBufferDx9GenerateStall;
+ bool ConstantBufferDx9GenerateStall;
/* variable length fields follow */
};
static inline void
GEN8_3DSTATE_GATHER_CONSTANT_DS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_GATHER_CONSTANT_DS * restrict values)
+ const struct GEN8_3DSTATE_GATHER_CONSTANT_DS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 53
+#define GEN8_3DSTATE_GATHER_CONSTANT_GS_length 0x00000000
+
struct GEN8_3DSTATE_GATHER_CONSTANT_GS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t ConstantBufferValid;
uint32_t ConstantBufferBindingTableBlock;
uint32_t GatherBufferOffset;
- uint32_t ConstantBufferDx9GenerateStall;
+ bool ConstantBufferDx9GenerateStall;
/* variable length fields follow */
};
static inline void
GEN8_3DSTATE_GATHER_CONSTANT_GS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_GATHER_CONSTANT_GS * restrict values)
+ const struct GEN8_3DSTATE_GATHER_CONSTANT_GS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 54
+#define GEN8_3DSTATE_GATHER_CONSTANT_HS_length 0x00000000
+
struct GEN8_3DSTATE_GATHER_CONSTANT_HS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t ConstantBufferValid;
uint32_t ConstantBufferBindingTableBlock;
uint32_t GatherBufferOffset;
- uint32_t ConstantBufferDx9GenerateStall;
+ bool ConstantBufferDx9GenerateStall;
/* variable length fields follow */
};
static inline void
GEN8_3DSTATE_GATHER_CONSTANT_HS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_GATHER_CONSTANT_HS * restrict values)
+ const struct GEN8_3DSTATE_GATHER_CONSTANT_HS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 56
+#define GEN8_3DSTATE_GATHER_CONSTANT_PS_length 0x00000000
+
struct GEN8_3DSTATE_GATHER_CONSTANT_PS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t ConstantBufferValid;
uint32_t ConstantBufferBindingTableBlock;
uint32_t GatherBufferOffset;
- uint32_t ConstantBufferDx9GenerateStall;
- uint32_t ConstantBufferDx9Enable;
+ bool ConstantBufferDx9GenerateStall;
+ bool ConstantBufferDx9Enable;
/* variable length fields follow */
};
static inline void
GEN8_3DSTATE_GATHER_CONSTANT_PS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_GATHER_CONSTANT_PS * restrict values)
+ const struct GEN8_3DSTATE_GATHER_CONSTANT_PS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 52
+#define GEN8_3DSTATE_GATHER_CONSTANT_VS_length 0x00000000
+
struct GEN8_3DSTATE_GATHER_CONSTANT_VS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t ConstantBufferValid;
uint32_t ConstantBufferBindingTableBlock;
uint32_t GatherBufferOffset;
- uint32_t ConstantBufferDx9GenerateStall;
- uint32_t ConstantBufferDx9Enable;
+ bool ConstantBufferDx9GenerateStall;
+ bool ConstantBufferDx9Enable;
/* variable length fields follow */
};
static inline void
GEN8_3DSTATE_GATHER_CONSTANT_VS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_GATHER_CONSTANT_VS * restrict values)
+ const struct GEN8_3DSTATE_GATHER_CONSTANT_VS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
/* variable length fields follow */
}
-#define GEN8_3DSTATE_GATHER_POOL_ALLOC_length 0x00000004
#define GEN8_3DSTATE_GATHER_POOL_ALLOC_length_bias 0x00000002
#define GEN8_3DSTATE_GATHER_POOL_ALLOC_header \
.CommandType = 3, \
._3DCommandSubOpcode = 26, \
.DwordLength = 2
+#define GEN8_3DSTATE_GATHER_POOL_ALLOC_length 0x00000004
+
struct GEN8_3DSTATE_GATHER_POOL_ALLOC {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
__gen_address_type GatherPoolBaseAddress;
- uint32_t GatherPoolEnable;
- uint32_t MemoryObjectControlState;
+ bool GatherPoolEnable;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState;
uint32_t GatherPoolBufferSize;
};
static inline void
GEN8_3DSTATE_GATHER_POOL_ALLOC_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_GATHER_POOL_ALLOC * restrict values)
+ const struct GEN8_3DSTATE_GATHER_POOL_ALLOC * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__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 */
+ __gen_field(dw_MemoryObjectControlState, 0, 6) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_combine_address(data, &dw[1], values->GatherPoolBaseAddress, dw1);
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
dw[3] =
__gen_field(values->GatherPoolBufferSize, 12, 31) |
0;
}
-#define GEN8_3DSTATE_GS_length 0x0000000a
#define GEN8_3DSTATE_GS_length_bias 0x00000002
#define GEN8_3DSTATE_GS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 17, \
.DwordLength = 8
+#define GEN8_3DSTATE_GS_length 0x0000000a
+
struct GEN8_3DSTATE_GS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t KernelStartPointer;
+ uint64_t KernelStartPointer;
uint32_t SingleProgramFlow;
#define Dmask 0
#define Vmask 1
#define IEEE754 0
#define Alternate 1
uint32_t FloatingPointMode;
- uint32_t IllegalOpcodeExceptionEnable;
- uint32_t AccessesUAV;
- uint32_t MaskStackExceptionEnable;
- uint32_t SoftwareExceptionEnable;
+ bool IllegalOpcodeExceptionEnable;
+ bool AccessesUAV;
+ bool MaskStackExceptionEnable;
+ bool SoftwareExceptionEnable;
uint32_t ExpectedVertexCount;
- uint32_t ScratchSpaceBasePointer;
+ uint64_t ScratchSpaceBasePointer;
uint32_t PerThreadScratchSpace;
uint32_t OutputVertexSize;
uint32_t OutputTopology;
uint32_t VertexURBEntryReadLength;
- uint32_t IncludeVertexHandles;
+ bool IncludeVertexHandles;
uint32_t VertexURBEntryReadOffset;
uint32_t DispatchGRFStartRegisterForURBData;
uint32_t MaximumNumberofThreads;
#define DispatchModeDualObject 2
#define DispatchModeSIMD8 3
uint32_t DispatchMode;
- uint32_t StatisticsEnable;
+ bool StatisticsEnable;
uint32_t InvocationsIncrementValue;
- uint32_t IncludePrimitiveID;
+ bool IncludePrimitiveID;
uint32_t Hint;
#define LEADING 0
#define TRAILING 1
uint32_t ReorderMode;
- uint32_t DiscardAdjacency;
- uint32_t Enable;
+ bool DiscardAdjacency;
+ bool Enable;
#define CUT 0
#define SID 1
uint32_t ControlDataFormat;
- uint32_t StaticOutput;
+ bool StaticOutput;
uint32_t StaticOutputVertexCount;
uint32_t VertexURBEntryOutputReadOffset;
uint32_t VertexURBEntryOutputLength;
static inline void
GEN8_3DSTATE_GS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_GS * restrict values)
+ const struct GEN8_3DSTATE_GS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_offset(values->KernelStartPointer, 6, 63) |
0;
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
dw[3] =
__gen_field(values->SingleProgramFlow, 31, 31) |
__gen_field(values->VectorMaskEnable, 30, 30) |
__gen_field(values->ExpectedVertexCount, 0, 5) |
0;
- dw[4] =
+ uint64_t qw4 =
__gen_offset(values->ScratchSpaceBasePointer, 10, 63) |
__gen_field(values->PerThreadScratchSpace, 0, 3) |
0;
+ dw[4] = qw4;
+ dw[5] = qw4 >> 32;
+
dw[6] =
__gen_field(values->OutputVertexSize, 23, 28) |
__gen_field(values->OutputTopology, 17, 22) |
}
-#define GEN8_3DSTATE_HIER_DEPTH_BUFFER_length 0x00000005
#define GEN8_3DSTATE_HIER_DEPTH_BUFFER_length_bias 0x00000002
#define GEN8_3DSTATE_HIER_DEPTH_BUFFER_header \
.CommandType = 3, \
._3DCommandSubOpcode = 7, \
.DwordLength = 3
+#define GEN8_3DSTATE_HIER_DEPTH_BUFFER_length 0x00000005
+
struct GEN8_3DSTATE_HIER_DEPTH_BUFFER {
uint32_t CommandType;
uint32_t CommandSubType;
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;
static inline void
GEN8_3DSTATE_HIER_DEPTH_BUFFER_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_HIER_DEPTH_BUFFER * restrict values)
+ const struct GEN8_3DSTATE_HIER_DEPTH_BUFFER * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__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 */
+ __gen_field(dw_HierarchicalDepthBufferObjectControlState, 25, 31) |
__gen_field(values->SurfacePitch, 0, 16) |
0;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2);
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
+
dw[4] =
__gen_field(values->SurfaceQPitch, 0, 14) |
0;
}
-#define GEN8_3DSTATE_HS_length 0x00000009
#define GEN8_3DSTATE_HS_length_bias 0x00000002
#define GEN8_3DSTATE_HS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 27, \
.DwordLength = 7
+#define GEN8_3DSTATE_HS_length 0x00000009
+
struct GEN8_3DSTATE_HS {
uint32_t CommandType;
uint32_t CommandSubType;
#define IEEE754 0
#define alternate 1
uint32_t FloatingPointMode;
- uint32_t IllegalOpcodeExceptionEnable;
- uint32_t SoftwareExceptionEnable;
- uint32_t Enable;
- uint32_t StatisticsEnable;
+ bool IllegalOpcodeExceptionEnable;
+ bool SoftwareExceptionEnable;
+ bool Enable;
+ bool StatisticsEnable;
uint32_t MaximumNumberofThreads;
uint32_t InstanceCount;
- uint32_t KernelStartPointer;
- uint32_t ScratchSpaceBasePointer;
+ uint64_t KernelStartPointer;
+ uint64_t ScratchSpaceBasePointer;
uint32_t PerThreadScratchSpace;
- uint32_t SingleProgramFlow;
+ bool SingleProgramFlow;
#define Dmask 0
#define Vmask 1
uint32_t VectorMaskEnable;
- uint32_t AccessesUAV;
- uint32_t IncludeVertexHandles;
+ bool AccessesUAV;
+ bool IncludeVertexHandles;
uint32_t DispatchGRFStartRegisterForURBData;
uint32_t VertexURBEntryReadLength;
uint32_t VertexURBEntryReadOffset;
static inline void
GEN8_3DSTATE_HS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_HS * restrict values)
+ const struct GEN8_3DSTATE_HS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->InstanceCount, 0, 3) |
0;
- dw[3] =
+ uint64_t qw3 =
__gen_offset(values->KernelStartPointer, 6, 63) |
0;
- dw[5] =
+ dw[3] = qw3;
+ dw[4] = qw3 >> 32;
+
+ uint64_t qw5 =
__gen_offset(values->ScratchSpaceBasePointer, 10, 63) |
__gen_field(values->PerThreadScratchSpace, 0, 3) |
0;
+ dw[5] = qw5;
+ dw[6] = qw5 >> 32;
+
dw[7] =
__gen_field(values->SingleProgramFlow, 27, 27) |
__gen_field(values->VectorMaskEnable, 26, 26) |
}
-#define GEN8_3DSTATE_INDEX_BUFFER_length 0x00000005
#define GEN8_3DSTATE_INDEX_BUFFER_length_bias 0x00000002
#define GEN8_3DSTATE_INDEX_BUFFER_header \
.CommandType = 3, \
._3DCommandSubOpcode = 10, \
.DwordLength = 3
+#define GEN8_3DSTATE_INDEX_BUFFER_length 0x00000005
+
struct GEN8_3DSTATE_INDEX_BUFFER {
uint32_t CommandType;
uint32_t CommandSubType;
#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;
};
static inline void
GEN8_3DSTATE_INDEX_BUFFER_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_INDEX_BUFFER * restrict values)
+ const struct GEN8_3DSTATE_INDEX_BUFFER * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__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 */
+ __gen_field(dw_MemoryObjectControlState, 0, 6) |
0;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->BufferStartingAddress, dw2);
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
+
dw[4] =
__gen_field(values->BufferSize, 0, 31) |
0;
}
-#define GEN8_3DSTATE_LINE_STIPPLE_length 0x00000003
#define GEN8_3DSTATE_LINE_STIPPLE_length_bias 0x00000002
#define GEN8_3DSTATE_LINE_STIPPLE_header \
.CommandType = 3, \
._3DCommandSubOpcode = 8, \
.DwordLength = 1
+#define GEN8_3DSTATE_LINE_STIPPLE_length 0x00000003
+
struct GEN8_3DSTATE_LINE_STIPPLE {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ModifyEnableCurrentRepeatCounterCurrentStippleIndex;
+ bool ModifyEnableCurrentRepeatCounterCurrentStippleIndex;
uint32_t CurrentRepeatCounter;
uint32_t CurrentStippleIndex;
uint32_t LineStipplePattern;
- uint32_t LineStippleInverseRepeatCount;
+ float LineStippleInverseRepeatCount;
uint32_t LineStippleRepeatCount;
};
static inline void
GEN8_3DSTATE_LINE_STIPPLE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_LINE_STIPPLE * restrict values)
+ const struct GEN8_3DSTATE_LINE_STIPPLE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
0;
dw[2] =
- __gen_field(values->LineStippleInverseRepeatCount, 15, 31) |
+ __gen_field(values->LineStippleInverseRepeatCount * (1 << 16), 15, 31) |
__gen_field(values->LineStippleRepeatCount, 0, 8) |
0;
}
-#define GEN8_3DSTATE_MONOFILTER_SIZE_length 0x00000002
#define GEN8_3DSTATE_MONOFILTER_SIZE_length_bias 0x00000002
#define GEN8_3DSTATE_MONOFILTER_SIZE_header \
.CommandType = 3, \
._3DCommandSubOpcode = 17, \
.DwordLength = 0
+#define GEN8_3DSTATE_MONOFILTER_SIZE_length 0x00000002
+
struct GEN8_3DSTATE_MONOFILTER_SIZE {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_MONOFILTER_SIZE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_MONOFILTER_SIZE * restrict values)
+ const struct GEN8_3DSTATE_MONOFILTER_SIZE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_MULTISAMPLE_length 0x00000002
#define GEN8_3DSTATE_MULTISAMPLE_length_bias 0x00000002
#define GEN8_3DSTATE_MULTISAMPLE_header \
.CommandType = 3, \
._3DCommandSubOpcode = 13, \
.DwordLength = 0
+#define GEN8_3DSTATE_MULTISAMPLE_length 0x00000002
+
struct GEN8_3DSTATE_MULTISAMPLE {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_MULTISAMPLE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_MULTISAMPLE * restrict values)
+ const struct GEN8_3DSTATE_MULTISAMPLE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_POLY_STIPPLE_OFFSET_length 0x00000002
#define GEN8_3DSTATE_POLY_STIPPLE_OFFSET_length_bias 0x00000002
#define GEN8_3DSTATE_POLY_STIPPLE_OFFSET_header \
.CommandType = 3, \
._3DCommandSubOpcode = 6, \
.DwordLength = 0
+#define GEN8_3DSTATE_POLY_STIPPLE_OFFSET_length 0x00000002
+
struct GEN8_3DSTATE_POLY_STIPPLE_OFFSET {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_POLY_STIPPLE_OFFSET_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_POLY_STIPPLE_OFFSET * restrict values)
+ const struct GEN8_3DSTATE_POLY_STIPPLE_OFFSET * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_POLY_STIPPLE_PATTERN_length 0x00000021
#define GEN8_3DSTATE_POLY_STIPPLE_PATTERN_length_bias 0x00000002
#define GEN8_3DSTATE_POLY_STIPPLE_PATTERN_header\
.CommandType = 3, \
._3DCommandSubOpcode = 7, \
.DwordLength = 31
+#define GEN8_3DSTATE_POLY_STIPPLE_PATTERN_length 0x00000021
+
struct GEN8_3DSTATE_POLY_STIPPLE_PATTERN {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t PatternRow;
+ uint32_t PatternRow[32];
};
static inline void
GEN8_3DSTATE_POLY_STIPPLE_PATTERN_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_POLY_STIPPLE_PATTERN * restrict values)
+ const struct GEN8_3DSTATE_POLY_STIPPLE_PATTERN * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- __gen_field(values->PatternRow, 0, 31) |
- 0;
+ for (uint32_t i = 0, j = 1; i < 32; i += 1, j++) {
+ dw[j] =
+ __gen_field(values->PatternRow[i + 0], 0, 31) |
+ 0;
+ }
}
-#define GEN8_3DSTATE_PS_length 0x0000000c
#define GEN8_3DSTATE_PS_length_bias 0x00000002
#define GEN8_3DSTATE_PS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 32, \
.DwordLength = 10
+#define GEN8_3DSTATE_PS_length 0x0000000c
+
struct GEN8_3DSTATE_PS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t KernelStartPointer0;
+ uint64_t KernelStartPointer0;
#define Multiple 0
#define Single 1
uint32_t SingleProgramFlow;
#define RD 2
#define RTZ 3
uint32_t RoundingMode;
- uint32_t IllegalOpcodeExceptionEnable;
- uint32_t MaskStackExceptionEnable;
- uint32_t SoftwareExceptionEnable;
- uint32_t ScratchSpaceBasePointer;
+ bool IllegalOpcodeExceptionEnable;
+ bool MaskStackExceptionEnable;
+ bool SoftwareExceptionEnable;
+ uint64_t ScratchSpaceBasePointer;
uint32_t PerThreadScratchSpace;
uint32_t MaximumNumberofThreadsPerPSD;
- uint32_t PushConstantEnable;
- uint32_t RenderTargetFastClearEnable;
- uint32_t RenderTargetResolveEnable;
+ bool PushConstantEnable;
+ bool RenderTargetFastClearEnable;
+ bool RenderTargetResolveEnable;
#define POSOFFSET_NONE 0
#define POSOFFSET_CENTROID 2
#define POSOFFSET_SAMPLE 3
uint32_t PositionXYOffsetSelect;
- uint32_t _32PixelDispatchEnable;
- uint32_t _16PixelDispatchEnable;
- uint32_t _8PixelDispatchEnable;
+ bool _32PixelDispatchEnable;
+ bool _16PixelDispatchEnable;
+ bool _8PixelDispatchEnable;
uint32_t DispatchGRFStartRegisterForConstantSetupData0;
uint32_t DispatchGRFStartRegisterForConstantSetupData1;
uint32_t DispatchGRFStartRegisterForConstantSetupData2;
- uint32_t KernelStartPointer1;
- uint32_t KernelStartPointer2;
+ uint64_t KernelStartPointer1;
+ uint64_t KernelStartPointer2;
};
static inline void
GEN8_3DSTATE_PS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_PS * restrict values)
+ const struct GEN8_3DSTATE_PS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_offset(values->KernelStartPointer0, 6, 63) |
0;
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
dw[3] =
__gen_field(values->SingleProgramFlow, 31, 31) |
__gen_field(values->VectorMaskEnable, 30, 30) |
__gen_field(values->SoftwareExceptionEnable, 7, 7) |
0;
- dw[4] =
+ uint64_t qw4 =
__gen_offset(values->ScratchSpaceBasePointer, 10, 63) |
__gen_field(values->PerThreadScratchSpace, 0, 3) |
0;
+ dw[4] = qw4;
+ dw[5] = qw4 >> 32;
+
dw[6] =
__gen_field(values->MaximumNumberofThreadsPerPSD, 23, 31) |
__gen_field(values->PushConstantEnable, 11, 11) |
__gen_field(values->DispatchGRFStartRegisterForConstantSetupData2, 0, 6) |
0;
- dw[8] =
+ uint64_t qw8 =
__gen_offset(values->KernelStartPointer1, 6, 63) |
0;
- dw[10] =
+ dw[8] = qw8;
+ dw[9] = qw8 >> 32;
+
+ uint64_t qw10 =
__gen_offset(values->KernelStartPointer2, 6, 63) |
0;
+ dw[10] = qw10;
+ dw[11] = qw10 >> 32;
+
}
-#define GEN8_3DSTATE_PS_BLEND_length 0x00000002
#define GEN8_3DSTATE_PS_BLEND_length_bias 0x00000002
#define GEN8_3DSTATE_PS_BLEND_header \
.CommandType = 3, \
._3DCommandSubOpcode = 77, \
.DwordLength = 0
+#define GEN8_3DSTATE_PS_BLEND_length 0x00000002
+
struct GEN8_3DSTATE_PS_BLEND {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t AlphaToCoverageEnable;
- uint32_t HasWriteableRT;
- uint32_t ColorBufferBlendEnable;
+ bool AlphaToCoverageEnable;
+ bool HasWriteableRT;
+ bool ColorBufferBlendEnable;
uint32_t SourceAlphaBlendFactor;
uint32_t DestinationAlphaBlendFactor;
uint32_t SourceBlendFactor;
uint32_t DestinationBlendFactor;
- uint32_t AlphaTestEnable;
- uint32_t IndependentAlphaBlendEnable;
+ bool AlphaTestEnable;
+ bool IndependentAlphaBlendEnable;
};
static inline void
GEN8_3DSTATE_PS_BLEND_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_PS_BLEND * restrict values)
+ const struct GEN8_3DSTATE_PS_BLEND * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_PS_EXTRA_length 0x00000002
#define GEN8_3DSTATE_PS_EXTRA_length_bias 0x00000002
#define GEN8_3DSTATE_PS_EXTRA_header \
.CommandType = 3, \
._3DCommandSubOpcode = 79, \
.DwordLength = 0
+#define GEN8_3DSTATE_PS_EXTRA_length 0x00000002
+
struct GEN8_3DSTATE_PS_EXTRA {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t PixelShaderValid;
- uint32_t PixelShaderDoesnotwritetoRT;
- uint32_t oMaskPresenttoRenderTarget;
- uint32_t PixelShaderKillsPixel;
+ bool PixelShaderValid;
+ bool PixelShaderDoesnotwritetoRT;
+ bool oMaskPresenttoRenderTarget;
+ bool PixelShaderKillsPixel;
#define PSCDEPTH_OFF 0
#define PSCDEPTH_ON 1
#define PSCDEPTH_ON_GE 2
#define PSCDEPTH_ON_LE 3
uint32_t PixelShaderComputedDepthMode;
- uint32_t ForceComputedDepth;
- uint32_t PixelShaderUsesSourceDepth;
- uint32_t PixelShaderUsesSourceW;
+ bool ForceComputedDepth;
+ bool PixelShaderUsesSourceDepth;
+ bool PixelShaderUsesSourceW;
uint32_t Removed;
- uint32_t AttributeEnable;
- uint32_t PixelShaderDisablesAlphaToCoverage;
- uint32_t PixelShaderIsPerSample;
- uint32_t PixelShaderHasUAV;
- uint32_t PixelShaderUsesInputCoverageMask;
+ bool AttributeEnable;
+ bool PixelShaderDisablesAlphaToCoverage;
+ bool PixelShaderIsPerSample;
+ bool PixelShaderHasUAV;
+ bool PixelShaderUsesInputCoverageMask;
};
static inline void
GEN8_3DSTATE_PS_EXTRA_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_PS_EXTRA * restrict values)
+ const struct GEN8_3DSTATE_PS_EXTRA * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length 0x00000002
#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length_bias 0x00000002
#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 20, \
.DwordLength = 0
+#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length 0x00000002
+
struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS * restrict values)
+ const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length 0x00000002
#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length_bias 0x00000002
#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 21, \
.DwordLength = 0
+#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length 0x00000002
+
struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS * restrict values)
+ const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length 0x00000002
#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length_bias 0x00000002
#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 19, \
.DwordLength = 0
+#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length 0x00000002
+
struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS * restrict values)
+ const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length 0x00000002
#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length_bias 0x00000002
#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 22, \
.DwordLength = 0
+#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length 0x00000002
+
struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS * restrict values)
+ const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length 0x00000002
#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length_bias 0x00000002
#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 18, \
.DwordLength = 0
+#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length 0x00000002
+
struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS * restrict values)
+ const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_RASTER_length 0x00000005
#define GEN8_3DSTATE_RASTER_length_bias 0x00000002
#define GEN8_3DSTATE_RASTER_header \
.CommandType = 3, \
._3DCommandSubOpcode = 80, \
.DwordLength = 3
+#define GEN8_3DSTATE_RASTER_length 0x00000005
+
struct GEN8_3DSTATE_RASTER {
uint32_t CommandType;
uint32_t CommandSubType;
#define Normal 0
#define Force 1
uint32_t ForceMultisampling;
- uint32_t SmoothPointEnable;
- uint32_t DXMultisampleRasterizationEnable;
+ bool SmoothPointEnable;
+ bool DXMultisampleRasterizationEnable;
#define MSRASTMODE_OFF_PIXEL 0
#define MSRASTMODE_OFF_PATTERN 1
#define MSRASTMODE_ON_PIXEL 2
#define MSRASTMODE_ON_PATTERN 3
uint32_t DXMultisampleRasterizationMode;
- uint32_t GlobalDepthOffsetEnableSolid;
- uint32_t GlobalDepthOffsetEnableWireframe;
- uint32_t GlobalDepthOffsetEnablePoint;
+ bool GlobalDepthOffsetEnableSolid;
+ bool GlobalDepthOffsetEnableWireframe;
+ bool GlobalDepthOffsetEnablePoint;
#define RASTER_SOLID 0
#define RASTER_WIREFRAME 1
#define RASTER_POINT 2
#define RASTER_WIREFRAME 1
#define RASTER_POINT 2
uint32_t BackFaceFillMode;
- uint32_t AntialiasingEnable;
- uint32_t ScissorRectangleEnable;
- uint32_t ViewportZClipTestEnable;
+ bool AntialiasingEnable;
+ bool ScissorRectangleEnable;
+ bool ViewportZClipTestEnable;
float GlobalDepthOffsetConstant;
float GlobalDepthOffsetScale;
float GlobalDepthOffsetClamp;
static inline void
GEN8_3DSTATE_RASTER_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_RASTER * restrict values)
+ const struct GEN8_3DSTATE_RASTER * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 1, \
._3DCommandSubOpcode = 2
+#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0_length 0x00000000
+
+#define GEN8_PALETTE_ENTRY_length 0x00000001
+
+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;
static inline void
GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0 * restrict values)
+ const struct GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0 * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 1, \
._3DCommandSubOpcode = 12
+#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1_length 0x00000000
+
struct GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1 {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1 * restrict values)
+ const struct GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1 * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
/* variable length fields follow */
}
-#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS_length 0x00000002
#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS_length_bias 0x00000002
#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 45, \
.DwordLength = 0
+#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS_length 0x00000002
+
struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS * restrict values)
+ const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS_length 0x00000002
#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS_length_bias 0x00000002
#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 46, \
.DwordLength = 0
+#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS_length 0x00000002
+
struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS * restrict values)
+ const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS_length 0x00000002
#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS_length_bias 0x00000002
#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 44, \
.DwordLength = 0
+#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS_length 0x00000002
+
struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS * restrict values)
+ const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS_length 0x00000002
#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS_length_bias 0x00000002
#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 47, \
.DwordLength = 0
+#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS_length 0x00000002
+
struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS * restrict values)
+ const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS_length 0x00000002
#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS_length_bias 0x00000002
#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 43, \
.DwordLength = 0
+#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS_length 0x00000002
+
struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS * restrict values)
+ const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_SAMPLE_MASK_length 0x00000002
#define GEN8_3DSTATE_SAMPLE_MASK_length_bias 0x00000002
#define GEN8_3DSTATE_SAMPLE_MASK_header \
.CommandType = 3, \
._3DCommandSubOpcode = 24, \
.DwordLength = 0
+#define GEN8_3DSTATE_SAMPLE_MASK_length 0x00000002
+
struct GEN8_3DSTATE_SAMPLE_MASK {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_SAMPLE_MASK_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SAMPLE_MASK * restrict values)
+ const struct GEN8_3DSTATE_SAMPLE_MASK * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_SAMPLE_PATTERN_length 0x00000009
#define GEN8_3DSTATE_SAMPLE_PATTERN_length_bias 0x00000002
#define GEN8_3DSTATE_SAMPLE_PATTERN_header \
.CommandType = 3, \
._3DCommandSubOpcode = 28, \
.DwordLength = 7
+#define GEN8_3DSTATE_SAMPLE_PATTERN_length 0x00000009
+
struct GEN8_3DSTATE_SAMPLE_PATTERN {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t _8xSample7XOffset;
- uint32_t _8xSample7YOffset;
- uint32_t _8xSample6XOffset;
- uint32_t _8xSample6YOffset;
- uint32_t _8xSample5XOffset;
- uint32_t _8xSample5YOffset;
- uint32_t _8xSample4XOffset;
- uint32_t _8xSample4YOffset;
- uint32_t _8xSample3XOffset;
- uint32_t _8xSample3YOffset;
- uint32_t _8xSample2XOffset;
- uint32_t _8xSample2YOffset;
- uint32_t _8xSample1XOffset;
- uint32_t _8xSample1YOffset;
- uint32_t _8xSample0XOffset;
- uint32_t _8xSample0YOffset;
- uint32_t _4xSample3XOffset;
- uint32_t _4xSample3YOffset;
- uint32_t _4xSample2XOffset;
- uint32_t _4xSample2YOffset;
- uint32_t _4xSample1XOffset;
- uint32_t _4xSample1YOffset;
- uint32_t _4xSample0XOffset;
- uint32_t _4xSample0YOffset;
- uint32_t _1xSample0XOffset;
- uint32_t _1xSample0YOffset;
- uint32_t _2xSample1XOffset;
- uint32_t _2xSample1YOffset;
- uint32_t _2xSample0XOffset;
- uint32_t _2xSample0YOffset;
+ float _8xSample7XOffset;
+ float _8xSample7YOffset;
+ float _8xSample6XOffset;
+ float _8xSample6YOffset;
+ float _8xSample5XOffset;
+ float _8xSample5YOffset;
+ float _8xSample4XOffset;
+ float _8xSample4YOffset;
+ float _8xSample3XOffset;
+ float _8xSample3YOffset;
+ float _8xSample2XOffset;
+ float _8xSample2YOffset;
+ float _8xSample1XOffset;
+ float _8xSample1YOffset;
+ float _8xSample0XOffset;
+ float _8xSample0YOffset;
+ float _4xSample3XOffset;
+ float _4xSample3YOffset;
+ float _4xSample2XOffset;
+ float _4xSample2YOffset;
+ float _4xSample1XOffset;
+ float _4xSample1YOffset;
+ float _4xSample0XOffset;
+ float _4xSample0YOffset;
+ float _1xSample0XOffset;
+ float _1xSample0YOffset;
+ float _2xSample1XOffset;
+ float _2xSample1YOffset;
+ float _2xSample0XOffset;
+ float _2xSample0YOffset;
};
static inline void
GEN8_3DSTATE_SAMPLE_PATTERN_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SAMPLE_PATTERN * restrict values)
+ const struct GEN8_3DSTATE_SAMPLE_PATTERN * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- 0;
+ for (uint32_t i = 0, j = 1; i < 4; i += 1, j++) {
+ dw[j] =
+ 0;
+ }
dw[5] =
- __gen_field(values->_8xSample7XOffset, 28, 31) |
- __gen_field(values->_8xSample7YOffset, 24, 27) |
- __gen_field(values->_8xSample6XOffset, 20, 23) |
- __gen_field(values->_8xSample6YOffset, 16, 19) |
- __gen_field(values->_8xSample5XOffset, 12, 15) |
- __gen_field(values->_8xSample5YOffset, 8, 11) |
- __gen_field(values->_8xSample4XOffset, 4, 7) |
- __gen_field(values->_8xSample4YOffset, 0, 3) |
+ __gen_field(values->_8xSample7XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->_8xSample7YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->_8xSample6XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->_8xSample6YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->_8xSample5XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->_8xSample5YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->_8xSample4XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->_8xSample4YOffset * (1 << 4), 0, 3) |
0;
dw[6] =
- __gen_field(values->_8xSample3XOffset, 28, 31) |
- __gen_field(values->_8xSample3YOffset, 24, 27) |
- __gen_field(values->_8xSample2XOffset, 20, 23) |
- __gen_field(values->_8xSample2YOffset, 16, 19) |
- __gen_field(values->_8xSample1XOffset, 12, 15) |
- __gen_field(values->_8xSample1YOffset, 8, 11) |
- __gen_field(values->_8xSample0XOffset, 4, 7) |
- __gen_field(values->_8xSample0YOffset, 0, 3) |
+ __gen_field(values->_8xSample3XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->_8xSample3YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->_8xSample2XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->_8xSample2YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->_8xSample1XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->_8xSample1YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->_8xSample0XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->_8xSample0YOffset * (1 << 4), 0, 3) |
0;
dw[7] =
- __gen_field(values->_4xSample3XOffset, 28, 31) |
- __gen_field(values->_4xSample3YOffset, 24, 27) |
- __gen_field(values->_4xSample2XOffset, 20, 23) |
- __gen_field(values->_4xSample2YOffset, 16, 19) |
- __gen_field(values->_4xSample1XOffset, 12, 15) |
- __gen_field(values->_4xSample1YOffset, 8, 11) |
- __gen_field(values->_4xSample0XOffset, 4, 7) |
- __gen_field(values->_4xSample0YOffset, 0, 3) |
+ __gen_field(values->_4xSample3XOffset * (1 << 4), 28, 31) |
+ __gen_field(values->_4xSample3YOffset * (1 << 4), 24, 27) |
+ __gen_field(values->_4xSample2XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->_4xSample2YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->_4xSample1XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->_4xSample1YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->_4xSample0XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->_4xSample0YOffset * (1 << 4), 0, 3) |
0;
dw[8] =
- __gen_field(values->_1xSample0XOffset, 20, 23) |
- __gen_field(values->_1xSample0YOffset, 16, 19) |
- __gen_field(values->_2xSample1XOffset, 12, 15) |
- __gen_field(values->_2xSample1YOffset, 8, 11) |
- __gen_field(values->_2xSample0XOffset, 4, 7) |
- __gen_field(values->_2xSample0YOffset, 0, 3) |
+ __gen_field(values->_1xSample0XOffset * (1 << 4), 20, 23) |
+ __gen_field(values->_1xSample0YOffset * (1 << 4), 16, 19) |
+ __gen_field(values->_2xSample1XOffset * (1 << 4), 12, 15) |
+ __gen_field(values->_2xSample1YOffset * (1 << 4), 8, 11) |
+ __gen_field(values->_2xSample0XOffset * (1 << 4), 4, 7) |
+ __gen_field(values->_2xSample0YOffset * (1 << 4), 0, 3) |
0;
}
-#define GEN8_3DSTATE_SBE_length 0x00000004
#define GEN8_3DSTATE_SBE_length_bias 0x00000002
#define GEN8_3DSTATE_SBE_header \
.CommandType = 3, \
._3DCommandSubOpcode = 31, \
.DwordLength = 2
+#define GEN8_3DSTATE_SBE_length 0x00000004
+
struct GEN8_3DSTATE_SBE {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ForceVertexURBEntryReadLength;
- uint32_t ForceVertexURBEntryReadOffset;
+ bool ForceVertexURBEntryReadLength;
+ bool ForceVertexURBEntryReadOffset;
uint32_t NumberofSFOutputAttributes;
- uint32_t AttributeSwizzleEnable;
+ bool AttributeSwizzleEnable;
#define UPPERLEFT 0
#define LOWERLEFT 1
uint32_t PointSpriteTextureCoordinateOrigin;
- uint32_t PrimitiveIDOverrideComponentW;
- uint32_t PrimitiveIDOverrideComponentZ;
- uint32_t PrimitiveIDOverrideComponentY;
- uint32_t PrimitiveIDOverrideComponentX;
+ bool PrimitiveIDOverrideComponentW;
+ bool PrimitiveIDOverrideComponentZ;
+ bool PrimitiveIDOverrideComponentY;
+ bool PrimitiveIDOverrideComponentX;
uint32_t VertexURBEntryReadLength;
uint32_t VertexURBEntryReadOffset;
uint32_t PrimitiveIDOverrideAttributeSelect;
static inline void
GEN8_3DSTATE_SBE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SBE * restrict values)
+ const struct GEN8_3DSTATE_SBE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_SBE_SWIZ_length 0x0000000b
#define GEN8_3DSTATE_SBE_SWIZ_length_bias 0x00000002
#define GEN8_3DSTATE_SBE_SWIZ_header \
.CommandType = 3, \
._3DCommandSubOpcode = 81, \
.DwordLength = 9
+#define GEN8_3DSTATE_SBE_SWIZ_length 0x0000000b
+
+#define GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL_length 0x00000001
+
+struct GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL {
+ bool ComponentOverrideW;
+ bool ComponentOverrideZ;
+ bool ComponentOverrideY;
+ bool 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;
- uint32_t Attribute15WrapShortestEnables;
- uint32_t Attribute14WrapShortestEnables;
- uint32_t Attribute13WrapShortestEnables;
- uint32_t Attribute12WrapShortestEnables;
- uint32_t Attribute11WrapShortestEnables;
- uint32_t Attribute10WrapShortestEnables;
- uint32_t Attribute09WrapShortestEnables;
- uint32_t Attribute08WrapShortestEnables;
- uint32_t Attribute07WrapShortestEnables;
- uint32_t Attribute06WrapShortestEnables;
- uint32_t Attribute05WrapShortestEnables;
- uint32_t Attribute04WrapShortestEnables;
- uint32_t Attribute03WrapShortestEnables;
- uint32_t Attribute02WrapShortestEnables;
- uint32_t Attribute01WrapShortestEnables;
- uint32_t Attribute00WrapShortestEnables;
+ struct GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL Attribute[16];
+ uint32_t AttributeWrapShortestEnables[16];
};
static inline void
GEN8_3DSTATE_SBE_SWIZ_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SBE_SWIZ * restrict values)
+ const struct GEN8_3DSTATE_SBE_SWIZ * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->DwordLength, 0, 7) |
0;
- dw[1] =
- /* Struct Attribute: found SF_OUTPUT_ATTRIBUTE_DETAIL */
- 0;
-
- dw[9] =
- __gen_field(values->Attribute15WrapShortestEnables, 60, 63) |
- __gen_field(values->Attribute14WrapShortestEnables, 56, 59) |
- __gen_field(values->Attribute13WrapShortestEnables, 52, 55) |
- __gen_field(values->Attribute12WrapShortestEnables, 48, 51) |
- __gen_field(values->Attribute11WrapShortestEnables, 44, 47) |
- __gen_field(values->Attribute10WrapShortestEnables, 40, 43) |
- __gen_field(values->Attribute09WrapShortestEnables, 36, 39) |
- __gen_field(values->Attribute08WrapShortestEnables, 32, 35) |
- __gen_field(values->Attribute07WrapShortestEnables, 28, 31) |
- __gen_field(values->Attribute06WrapShortestEnables, 24, 27) |
- __gen_field(values->Attribute05WrapShortestEnables, 20, 23) |
- __gen_field(values->Attribute04WrapShortestEnables, 16, 19) |
- __gen_field(values->Attribute03WrapShortestEnables, 12, 15) |
- __gen_field(values->Attribute02WrapShortestEnables, 8, 11) |
- __gen_field(values->Attribute01WrapShortestEnables, 4, 7) |
- __gen_field(values->Attribute00WrapShortestEnables, 0, 3) |
- 0;
+ for (uint32_t i = 0, j = 1; i < 16; i += 2, j++) {
+ uint32_t dw_Attribute0;
+ GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &dw_Attribute0, &values->Attribute[i + 0]);
+ uint32_t dw_Attribute1;
+ GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &dw_Attribute1, &values->Attribute[i + 1]);
+ dw[j] =
+ __gen_field(dw_Attribute0, 0, 15) |
+ __gen_field(dw_Attribute1, 16, 31) |
+ 0;
+ }
+
+ for (uint32_t i = 0, j = 9; i < 16; i += 8, j++) {
+ dw[j] =
+ __gen_field(values->AttributeWrapShortestEnables[i + 0], 0, 3) |
+ __gen_field(values->AttributeWrapShortestEnables[i + 1], 4, 7) |
+ __gen_field(values->AttributeWrapShortestEnables[i + 2], 8, 11) |
+ __gen_field(values->AttributeWrapShortestEnables[i + 3], 12, 15) |
+ __gen_field(values->AttributeWrapShortestEnables[i + 4], 16, 19) |
+ __gen_field(values->AttributeWrapShortestEnables[i + 5], 20, 23) |
+ __gen_field(values->AttributeWrapShortestEnables[i + 6], 24, 27) |
+ __gen_field(values->AttributeWrapShortestEnables[i + 7], 28, 31) |
+ 0;
+ }
}
-#define GEN8_3DSTATE_SCISSOR_STATE_POINTERS_length 0x00000002
#define GEN8_3DSTATE_SCISSOR_STATE_POINTERS_length_bias 0x00000002
#define GEN8_3DSTATE_SCISSOR_STATE_POINTERS_header\
.CommandType = 3, \
._3DCommandSubOpcode = 15, \
.DwordLength = 0
+#define GEN8_3DSTATE_SCISSOR_STATE_POINTERS_length 0x00000002
+
struct GEN8_3DSTATE_SCISSOR_STATE_POINTERS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_SCISSOR_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SCISSOR_STATE_POINTERS * restrict values)
+ const struct GEN8_3DSTATE_SCISSOR_STATE_POINTERS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_SF_length 0x00000004
#define GEN8_3DSTATE_SF_length_bias 0x00000002
#define GEN8_3DSTATE_SF_header \
.CommandType = 3, \
._3DCommandSubOpcode = 19, \
.DwordLength = 2
+#define GEN8_3DSTATE_SF_length 0x00000004
+
struct GEN8_3DSTATE_SF {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t LegacyGlobalDepthBiasEnable;
- uint32_t StatisticsEnable;
- uint32_t ViewportTransformEnable;
- uint32_t LineWidth;
+ bool LegacyGlobalDepthBiasEnable;
+ bool StatisticsEnable;
+ bool ViewportTransformEnable;
+ float LineWidth;
#define _05pixels 0
#define _10pixels 1
#define _20pixels 2
#define _40pixels 3
uint32_t LineEndCapAntialiasingRegionWidth;
- uint32_t LastPixelEnable;
+ bool LastPixelEnable;
uint32_t TriangleStripListProvokingVertexSelect;
uint32_t LineStripListProvokingVertexSelect;
uint32_t TriangleFanProvokingVertexSelect;
#define AALINEDISTANCE_TRUE 1
uint32_t AALineDistanceMode;
- uint32_t SmoothPointEnable;
+ bool SmoothPointEnable;
uint32_t VertexSubPixelPrecisionSelect;
#define Vertex 0
#define State 1
uint32_t PointWidthSource;
- uint32_t PointWidth;
+ float PointWidth;
};
static inline void
GEN8_3DSTATE_SF_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SF * restrict values)
+ const struct GEN8_3DSTATE_SF * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
0;
dw[2] =
- __gen_field(values->LineWidth, 18, 27) |
+ __gen_field(values->LineWidth * (1 << 7), 18, 27) |
__gen_field(values->LineEndCapAntialiasingRegionWidth, 16, 17) |
0;
__gen_field(values->SmoothPointEnable, 13, 13) |
__gen_field(values->VertexSubPixelPrecisionSelect, 12, 12) |
__gen_field(values->PointWidthSource, 11, 11) |
- __gen_field(values->PointWidth, 0, 10) |
+ __gen_field(values->PointWidth * (1 << 3), 0, 10) |
0;
}
-#define GEN8_3DSTATE_SO_BUFFER_length 0x00000008
#define GEN8_3DSTATE_SO_BUFFER_length_bias 0x00000002
#define GEN8_3DSTATE_SO_BUFFER_header \
.CommandType = 3, \
._3DCommandSubOpcode = 24, \
.DwordLength = 6
+#define GEN8_3DSTATE_SO_BUFFER_length 0x00000008
+
struct GEN8_3DSTATE_SO_BUFFER {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t SOBufferEnable;
+ bool SOBufferEnable;
uint32_t SOBufferIndex;
- uint32_t SOBufferObjectControlState;
- uint32_t StreamOffsetWriteEnable;
- uint32_t StreamOutputBufferOffsetAddressEnable;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE SOBufferObjectControlState;
+ bool StreamOffsetWriteEnable;
+ bool StreamOutputBufferOffsetAddressEnable;
__gen_address_type SurfaceBaseAddress;
uint32_t SurfaceSize;
__gen_address_type StreamOutputBufferOffsetAddress;
static inline void
GEN8_3DSTATE_SO_BUFFER_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SO_BUFFER * restrict values)
+ const struct GEN8_3DSTATE_SO_BUFFER * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__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 */
+ __gen_field(dw_SOBufferObjectControlState, 22, 28) |
__gen_field(values->StreamOffsetWriteEnable, 21, 21) |
__gen_field(values->StreamOutputBufferOffsetAddressEnable, 20, 20) |
0;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2);
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
+
dw[4] =
__gen_field(values->SurfaceSize, 0, 29) |
0;
uint32_t dw5 =
0;
- dw[5] =
+ uint64_t qw5 =
__gen_combine_address(data, &dw[5], values->StreamOutputBufferOffsetAddress, dw5);
+ dw[5] = qw5;
+ dw[6] = qw5 >> 32;
+
dw[7] =
__gen_field(values->StreamOffset, 0, 31) |
0;
._3DCommandOpcode = 1, \
._3DCommandSubOpcode = 23
-struct GEN8_3DSTATE_SO_DECL_LIST {
- uint32_t CommandType;
- uint32_t CommandSubType;
- uint32_t _3DCommandOpcode;
- uint32_t _3DCommandSubOpcode;
- uint32_t DwordLength;
- uint32_t StreamtoBufferSelects3;
- uint32_t StreamtoBufferSelects2;
- uint32_t StreamtoBufferSelects1;
- uint32_t StreamtoBufferSelects0;
- uint32_t NumEntries3;
- uint32_t NumEntries2;
- uint32_t NumEntries1;
- uint32_t NumEntries0;
- /* variable length fields follow */
+#define GEN8_3DSTATE_SO_DECL_LIST_length 0x00000000
+
+#define GEN8_SO_DECL_ENTRY_length 0x00000002
+
+#define GEN8_SO_DECL_length 0x00000001
+
+struct GEN8_SO_DECL {
+ uint32_t OutputBufferSlot;
+ uint32_t HoleFlag;
+ uint32_t RegisterIndex;
+ uint32_t ComponentMask;
};
static inline void
-GEN8_3DSTATE_SO_DECL_LIST_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_SO_DECL_LIST * restrict values)
+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->CommandType, 29, 31) |
- __gen_field(values->CommandSubType, 27, 28) |
- __gen_field(values->_3DCommandOpcode, 24, 26) |
- __gen_field(values->_3DCommandSubOpcode, 16, 23) |
- __gen_field(values->DwordLength, 0, 8) |
+ __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;
- dw[1] =
- __gen_field(values->StreamtoBufferSelects3, 12, 15) |
+}
+
+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);
+ uint64_t qw0 =
+ __gen_field(dw_Stream3Decl, 48, 63) |
+ __gen_field(dw_Stream2Decl, 32, 47) |
+ __gen_field(dw_Stream1Decl, 16, 31) |
+ __gen_field(dw_Stream0Decl, 0, 15) |
+ 0;
+
+ dw[0] = qw0;
+ dw[1] = qw0 >> 32;
+
+}
+
+struct GEN8_3DSTATE_SO_DECL_LIST {
+ uint32_t CommandType;
+ uint32_t CommandSubType;
+ uint32_t _3DCommandOpcode;
+ uint32_t _3DCommandSubOpcode;
+ uint32_t DwordLength;
+ uint32_t StreamtoBufferSelects3;
+ uint32_t StreamtoBufferSelects2;
+ uint32_t StreamtoBufferSelects1;
+ uint32_t StreamtoBufferSelects0;
+ uint32_t NumEntries3;
+ uint32_t NumEntries2;
+ uint32_t NumEntries1;
+ uint32_t NumEntries0;
+ /* variable length fields follow */
+};
+
+static inline void
+GEN8_3DSTATE_SO_DECL_LIST_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_3DSTATE_SO_DECL_LIST * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ 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) |
+ __gen_field(values->DwordLength, 0, 8) |
+ 0;
+
+ dw[1] =
+ __gen_field(values->StreamtoBufferSelects3, 12, 15) |
__gen_field(values->StreamtoBufferSelects2, 8, 11) |
__gen_field(values->StreamtoBufferSelects1, 4, 7) |
__gen_field(values->StreamtoBufferSelects0, 0, 3) |
/* variable length fields follow */
}
-#define GEN8_3DSTATE_STENCIL_BUFFER_length 0x00000005
#define GEN8_3DSTATE_STENCIL_BUFFER_length_bias 0x00000002
#define GEN8_3DSTATE_STENCIL_BUFFER_header \
.CommandType = 3, \
._3DCommandSubOpcode = 6, \
.DwordLength = 3
+#define GEN8_3DSTATE_STENCIL_BUFFER_length 0x00000005
+
struct GEN8_3DSTATE_STENCIL_BUFFER {
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;
static inline void
GEN8_3DSTATE_STENCIL_BUFFER_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_STENCIL_BUFFER * restrict values)
+ const struct GEN8_3DSTATE_STENCIL_BUFFER * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__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 */
+ __gen_field(dw_StencilBufferObjectControlState, 22, 28) |
__gen_field(values->SurfacePitch, 0, 16) |
0;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2);
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
+
dw[4] =
__gen_field(values->SurfaceQPitch, 0, 14) |
0;
}
-#define GEN8_3DSTATE_STREAMOUT_length 0x00000005
#define GEN8_3DSTATE_STREAMOUT_length_bias 0x00000002
#define GEN8_3DSTATE_STREAMOUT_header \
.CommandType = 3, \
._3DCommandSubOpcode = 30, \
.DwordLength = 3
+#define GEN8_3DSTATE_STREAMOUT_length 0x00000005
+
struct GEN8_3DSTATE_STREAMOUT {
uint32_t CommandType;
uint32_t CommandSubType;
#define LEADING 0
#define TRAILING 1
uint32_t ReorderMode;
- uint32_t SOStatisticsEnable;
+ bool SOStatisticsEnable;
#define Normal 0
#define Resreved 1
#define Force_Off 2
static inline void
GEN8_3DSTATE_STREAMOUT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_STREAMOUT * restrict values)
+ const struct GEN8_3DSTATE_STREAMOUT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_TE_length 0x00000004
#define GEN8_3DSTATE_TE_length_bias 0x00000002
#define GEN8_3DSTATE_TE_header \
.CommandType = 3, \
._3DCommandSubOpcode = 28, \
.DwordLength = 2
+#define GEN8_3DSTATE_TE_length 0x00000004
+
struct GEN8_3DSTATE_TE {
uint32_t CommandType;
uint32_t CommandSubType;
#define EVEN_FRACTIONAL 2
uint32_t Partitioning;
#define POINT 0
-#define LINE 1
-#define TRI_CW 2
-#define TRI_CCW 3
+#define OUTPUT_LINE 1
+#define OUTPUT_TRI_CW 2
+#define OUTPUT_TRI_CCW 3
uint32_t OutputTopology;
#define QUAD 0
#define TRI 1
#define HW_TESS 0
#define SW_TESS 1
uint32_t TEMode;
- uint32_t TEEnable;
+ bool TEEnable;
float MaximumTessellationFactorOdd;
float MaximumTessellationFactorNotOdd;
};
static inline void
GEN8_3DSTATE_TE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_TE * restrict values)
+ const struct GEN8_3DSTATE_TE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_URB_DS_length 0x00000002
#define GEN8_3DSTATE_URB_DS_length_bias 0x00000002
#define GEN8_3DSTATE_URB_DS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 50, \
.DwordLength = 0
+#define GEN8_3DSTATE_URB_DS_length 0x00000002
+
struct GEN8_3DSTATE_URB_DS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_URB_DS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_URB_DS * restrict values)
+ const struct GEN8_3DSTATE_URB_DS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_URB_GS_length 0x00000002
#define GEN8_3DSTATE_URB_GS_length_bias 0x00000002
#define GEN8_3DSTATE_URB_GS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 51, \
.DwordLength = 0
+#define GEN8_3DSTATE_URB_GS_length 0x00000002
+
struct GEN8_3DSTATE_URB_GS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_URB_GS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_URB_GS * restrict values)
+ const struct GEN8_3DSTATE_URB_GS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_URB_HS_length 0x00000002
#define GEN8_3DSTATE_URB_HS_length_bias 0x00000002
#define GEN8_3DSTATE_URB_HS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 49, \
.DwordLength = 0
+#define GEN8_3DSTATE_URB_HS_length 0x00000002
+
struct GEN8_3DSTATE_URB_HS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_URB_HS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_URB_HS * restrict values)
+ const struct GEN8_3DSTATE_URB_HS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 8
+#define GEN8_3DSTATE_VERTEX_BUFFERS_length 0x00000000
+
+#define GEN8_VERTEX_BUFFER_STATE_length 0x00000004
+
+struct GEN8_VERTEX_BUFFER_STATE {
+ uint32_t VertexBufferIndex;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState;
+ uint32_t AddressModifyEnable;
+ bool 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) |
+ __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;
+
+ uint64_t qw1 =
+ __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1);
+
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
+ dw[3] =
+ __gen_field(values->BufferSize, 0, 31) |
+ 0;
+
+}
+
struct GEN8_3DSTATE_VERTEX_BUFFERS {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_VERTEX_BUFFERS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_VERTEX_BUFFERS * restrict values)
+ const struct GEN8_3DSTATE_VERTEX_BUFFERS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 9
+#define GEN8_3DSTATE_VERTEX_ELEMENTS_length 0x00000000
+
+#define GEN8_VERTEX_ELEMENT_STATE_length 0x00000002
+
+struct GEN8_VERTEX_ELEMENT_STATE {
+ uint32_t VertexBufferIndex;
+ bool Valid;
+ uint32_t SourceElementFormat;
+ bool 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;
static inline void
GEN8_3DSTATE_VERTEX_ELEMENTS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_VERTEX_ELEMENTS * restrict values)
+ const struct GEN8_3DSTATE_VERTEX_ELEMENTS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
/* variable length fields follow */
}
-#define GEN8_3DSTATE_VF_length 0x00000002
#define GEN8_3DSTATE_VF_length_bias 0x00000002
#define GEN8_3DSTATE_VF_header \
.CommandType = 3, \
._3DCommandSubOpcode = 12, \
.DwordLength = 0
+#define GEN8_3DSTATE_VF_length 0x00000002
+
struct GEN8_3DSTATE_VF {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
- uint32_t IndexedDrawCutIndexEnable;
+ bool IndexedDrawCutIndexEnable;
uint32_t DwordLength;
uint32_t CutIndex;
};
static inline void
GEN8_3DSTATE_VF_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_VF * restrict values)
+ const struct GEN8_3DSTATE_VF * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_VF_INSTANCING_length 0x00000003
#define GEN8_3DSTATE_VF_INSTANCING_length_bias 0x00000002
#define GEN8_3DSTATE_VF_INSTANCING_header \
.CommandType = 3, \
._3DCommandSubOpcode = 73, \
.DwordLength = 1
+#define GEN8_3DSTATE_VF_INSTANCING_length 0x00000003
+
struct GEN8_3DSTATE_VF_INSTANCING {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t InstancingEnable;
+ bool InstancingEnable;
uint32_t VertexElementIndex;
uint32_t InstanceDataStepRate;
};
static inline void
GEN8_3DSTATE_VF_INSTANCING_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_VF_INSTANCING * restrict values)
+ const struct GEN8_3DSTATE_VF_INSTANCING * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_VF_SGVS_length 0x00000002
#define GEN8_3DSTATE_VF_SGVS_length_bias 0x00000002
#define GEN8_3DSTATE_VF_SGVS_header \
.CommandType = 3, \
._3DCommandSubOpcode = 74, \
.DwordLength = 0
+#define GEN8_3DSTATE_VF_SGVS_length 0x00000002
+
struct GEN8_3DSTATE_VF_SGVS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t InstanceIDEnable;
+ bool InstanceIDEnable;
#define COMP_0 0
#define COMP_1 1
#define COMP_2 2
#define COMP_3 3
uint32_t InstanceIDComponentNumber;
uint32_t InstanceIDElementOffset;
- uint32_t VertexIDEnable;
+ bool VertexIDEnable;
#define COMP_0 0
#define COMP_1 1
#define COMP_2 2
static inline void
GEN8_3DSTATE_VF_SGVS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_VF_SGVS * restrict values)
+ const struct GEN8_3DSTATE_VF_SGVS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_VF_STATISTICS_length 0x00000001
#define GEN8_3DSTATE_VF_STATISTICS_length_bias 0x00000001
#define GEN8_3DSTATE_VF_STATISTICS_header \
.CommandType = 3, \
._3DCommandOpcode = 0, \
._3DCommandSubOpcode = 11
+#define GEN8_3DSTATE_VF_STATISTICS_length 0x00000001
+
struct GEN8_3DSTATE_VF_STATISTICS {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
- uint32_t StatisticsEnable;
+ bool StatisticsEnable;
};
static inline void
GEN8_3DSTATE_VF_STATISTICS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_VF_STATISTICS * restrict values)
+ const struct GEN8_3DSTATE_VF_STATISTICS * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_VF_TOPOLOGY_length 0x00000002
#define GEN8_3DSTATE_VF_TOPOLOGY_length_bias 0x00000002
#define GEN8_3DSTATE_VF_TOPOLOGY_header \
.CommandType = 3, \
._3DCommandSubOpcode = 75, \
.DwordLength = 0
+#define GEN8_3DSTATE_VF_TOPOLOGY_length 0x00000002
+
struct GEN8_3DSTATE_VF_TOPOLOGY {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_VF_TOPOLOGY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_VF_TOPOLOGY * restrict values)
+ const struct GEN8_3DSTATE_VF_TOPOLOGY * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length 0x00000002
#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length_bias 0x00000002
#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC_header\
.CommandType = 3, \
._3DCommandSubOpcode = 35, \
.DwordLength = 0
+#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length 0x00000002
+
struct GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC * restrict values)
+ const struct GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length 0x00000002
#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length_bias 0x00000002
#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_header\
.CommandType = 3, \
._3DCommandSubOpcode = 33, \
.DwordLength = 0
+#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length 0x00000002
+
struct GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP {
uint32_t CommandType;
uint32_t CommandSubType;
static inline void
GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP * restrict values)
+ const struct GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_WM_length 0x00000002
#define GEN8_3DSTATE_WM_length_bias 0x00000002
#define GEN8_3DSTATE_WM_header \
.CommandType = 3, \
._3DCommandSubOpcode = 20, \
.DwordLength = 0
+#define GEN8_3DSTATE_WM_length 0x00000002
+
struct GEN8_3DSTATE_WM {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t StatisticsEnable;
- uint32_t LegacyDepthBufferClearEnable;
- uint32_t LegacyDepthBufferResolveEnable;
- uint32_t LegacyHierarchicalDepthBufferResolveEnable;
- uint32_t LegacyDiamondLineRasterization;
+ bool StatisticsEnable;
+ bool LegacyDepthBufferClearEnable;
+ bool LegacyDepthBufferResolveEnable;
+ bool LegacyHierarchicalDepthBufferResolveEnable;
+ bool LegacyDiamondLineRasterization;
#define NORMAL 0
#define PSEXEC 1
#define PREPS 2
#define _20pixels 2
#define _40pixels 3
uint32_t LineAntialiasingRegionWidth;
- uint32_t PolygonStippleEnable;
- uint32_t LineStippleEnable;
+ bool PolygonStippleEnable;
+ bool LineStippleEnable;
#define RASTRULE_UPPER_LEFT 0
#define RASTRULE_UPPER_RIGHT 1
uint32_t PointRasterizationRule;
static inline void
GEN8_3DSTATE_WM_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_WM * restrict values)
+ const struct GEN8_3DSTATE_WM * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_WM_CHROMAKEY_length 0x00000002
#define GEN8_3DSTATE_WM_CHROMAKEY_length_bias 0x00000002
#define GEN8_3DSTATE_WM_CHROMAKEY_header \
.CommandType = 3, \
._3DCommandSubOpcode = 76, \
.DwordLength = 0
+#define GEN8_3DSTATE_WM_CHROMAKEY_length 0x00000002
+
struct GEN8_3DSTATE_WM_CHROMAKEY {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t ChromaKeyKillEnable;
+ bool ChromaKeyKillEnable;
};
static inline void
GEN8_3DSTATE_WM_CHROMAKEY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_WM_CHROMAKEY * restrict values)
+ const struct GEN8_3DSTATE_WM_CHROMAKEY * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_WM_DEPTH_STENCIL_length 0x00000003
#define GEN8_3DSTATE_WM_DEPTH_STENCIL_length_bias 0x00000002
#define GEN8_3DSTATE_WM_DEPTH_STENCIL_header \
.CommandType = 3, \
._3DCommandSubOpcode = 78, \
.DwordLength = 1
+#define GEN8_3DSTATE_WM_DEPTH_STENCIL_length 0x00000003
+
struct GEN8_3DSTATE_WM_DEPTH_STENCIL {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t BackfaceStencilPassDepthPassOp;
uint32_t StencilTestFunction;
uint32_t DepthTestFunction;
-#define False 0
-#define True 1
- uint32_t DoubleSidedStencilEnable;
- uint32_t StencilTestEnable;
- uint32_t StencilBufferWriteEnable;
- uint32_t DepthTestEnable;
- uint32_t DepthBufferWriteEnable;
+ bool DoubleSidedStencilEnable;
+ bool StencilTestEnable;
+ bool StencilBufferWriteEnable;
+ bool DepthTestEnable;
+ bool DepthBufferWriteEnable;
uint32_t StencilTestMask;
uint32_t StencilWriteMask;
uint32_t BackfaceStencilTestMask;
static inline void
GEN8_3DSTATE_WM_DEPTH_STENCIL_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_WM_DEPTH_STENCIL * restrict values)
+ const struct GEN8_3DSTATE_WM_DEPTH_STENCIL * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_3DSTATE_WM_HZ_OP_length 0x00000005
#define GEN8_3DSTATE_WM_HZ_OP_length_bias 0x00000002
#define GEN8_3DSTATE_WM_HZ_OP_header \
.CommandType = 3, \
._3DCommandSubOpcode = 82, \
.DwordLength = 3
+#define GEN8_3DSTATE_WM_HZ_OP_length 0x00000005
+
struct GEN8_3DSTATE_WM_HZ_OP {
uint32_t CommandType;
uint32_t CommandSubType;
uint32_t _3DCommandOpcode;
uint32_t _3DCommandSubOpcode;
uint32_t DwordLength;
- uint32_t StencilBufferClearEnable;
- uint32_t DepthBufferClearEnable;
- uint32_t ScissorRectangleEnable;
- uint32_t DepthBufferResolveEnable;
- uint32_t HierarchicalDepthBufferResolveEnable;
+ bool StencilBufferClearEnable;
+ bool DepthBufferClearEnable;
+ bool ScissorRectangleEnable;
+ bool DepthBufferResolveEnable;
+ bool HierarchicalDepthBufferResolveEnable;
uint32_t PixelPositionOffsetEnable;
- uint32_t FullSurfaceDepthClear;
+ bool FullSurfaceDepthClear;
uint32_t StencilClearValue;
uint32_t NumberofMultisamples;
uint32_t ClearRectangleYMin;
static inline void
GEN8_3DSTATE_WM_HZ_OP_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_3DSTATE_WM_HZ_OP * restrict values)
+ const struct GEN8_3DSTATE_WM_HZ_OP * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_GPGPU_WALKER_length 0x0000000f
#define GEN8_GPGPU_WALKER_length_bias 0x00000002
#define GEN8_GPGPU_WALKER_header \
.CommandType = 3, \
.SubOpcode = 5, \
.DwordLength = 13
+#define GEN8_GPGPU_WALKER_length 0x0000000f
+
struct GEN8_GPGPU_WALKER {
uint32_t CommandType;
uint32_t Pipeline;
uint32_t MediaCommandOpcode;
uint32_t SubOpcode;
- uint32_t IndirectParameterEnable;
- uint32_t PredicateEnable;
+ bool IndirectParameterEnable;
+ bool PredicateEnable;
uint32_t DwordLength;
uint32_t InterfaceDescriptorOffset;
uint32_t IndirectDataLength;
static inline void
GEN8_GPGPU_WALKER_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_GPGPU_WALKER * restrict values)
+ const struct GEN8_GPGPU_WALKER * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MEDIA_CURBE_LOAD_length 0x00000004
#define GEN8_MEDIA_CURBE_LOAD_length_bias 0x00000002
#define GEN8_MEDIA_CURBE_LOAD_header \
.CommandType = 3, \
.SubOpcode = 1, \
.DwordLength = 2
+#define GEN8_MEDIA_CURBE_LOAD_length 0x00000004
+
struct GEN8_MEDIA_CURBE_LOAD {
uint32_t CommandType;
uint32_t Pipeline;
static inline void
GEN8_MEDIA_CURBE_LOAD_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MEDIA_CURBE_LOAD * restrict values)
+ const struct GEN8_MEDIA_CURBE_LOAD * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length 0x00000004
#define GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length_bias 0x00000002
#define GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD_header\
.CommandType = 3, \
.SubOpcode = 2, \
.DwordLength = 2
+#define GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length 0x00000004
+
struct GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD {
uint32_t CommandType;
uint32_t Pipeline;
static inline void
GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD * restrict values)
+ const struct GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
.MediaCommandOpcode = 1, \
.MediaCommandSubOpcode = 0
+#define GEN8_MEDIA_OBJECT_length 0x00000000
+
struct GEN8_MEDIA_OBJECT {
uint32_t CommandType;
uint32_t MediaCommandPipeline;
uint32_t MediaCommandSubOpcode;
uint32_t DwordLength;
uint32_t InterfaceDescriptorOffset;
- uint32_t ChildrenPresent;
+ bool ChildrenPresent;
#define Nothreadsynchronization 0
#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1
uint32_t ThreadSynchronization;
uint32_t ScoredboardY;
uint32_t ScoreboardX;
uint32_t ScoreboardColor;
- uint32_t ScoreboardMask;
+ bool ScoreboardMask;
/* variable length fields follow */
};
static inline void
GEN8_MEDIA_OBJECT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MEDIA_OBJECT * restrict values)
+ const struct GEN8_MEDIA_OBJECT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
.MediaCommandOpcode = 1, \
.MediaCommandSubOpcode = 6
+#define GEN8_MEDIA_OBJECT_GRPID_length 0x00000000
+
struct GEN8_MEDIA_OBJECT_GRPID {
uint32_t CommandType;
uint32_t MediaCommandPipeline;
uint32_t SubSliceDestinationSelect;
uint32_t IndirectDataLength;
__gen_address_type IndirectDataStartAddress;
- uint32_t ScoredboardY;
+ uint32_t ScoreboardY;
uint32_t ScoreboardX;
uint32_t ScoreboardColor;
- uint32_t ScoreboardMask;
+ bool ScoreboardMask;
uint32_t GroupID;
/* variable length fields follow */
};
static inline void
GEN8_MEDIA_OBJECT_GRPID_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MEDIA_OBJECT_GRPID * restrict values)
+ const struct GEN8_MEDIA_OBJECT_GRPID * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_combine_address(data, &dw[3], values->IndirectDataStartAddress, dw3);
dw[4] =
- __gen_field(values->ScoredboardY, 16, 24) |
+ __gen_field(values->ScoreboardY, 16, 24) |
__gen_field(values->ScoreboardX, 0, 8) |
0;
/* variable length fields follow */
}
-#define GEN8_MEDIA_OBJECT_PRT_length 0x00000010
#define GEN8_MEDIA_OBJECT_PRT_length_bias 0x00000002
#define GEN8_MEDIA_OBJECT_PRT_header \
.CommandType = 3, \
.SubOpcode = 2, \
.DwordLength = 14
+#define GEN8_MEDIA_OBJECT_PRT_length 0x00000010
+
struct GEN8_MEDIA_OBJECT_PRT {
uint32_t CommandType;
uint32_t Pipeline;
uint32_t SubOpcode;
uint32_t DwordLength;
uint32_t InterfaceDescriptorOffset;
- uint32_t ChildrenPresent;
- uint32_t PRT_FenceNeeded;
+ bool ChildrenPresent;
+ bool PRT_FenceNeeded;
#define Rootthreadqueue 0
#define VFEstateflush 1
uint32_t PRT_FenceType;
- uint32_t InlineData;
+ uint32_t InlineData[12];
};
static inline void
GEN8_MEDIA_OBJECT_PRT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MEDIA_OBJECT_PRT * restrict values)
+ const struct GEN8_MEDIA_OBJECT_PRT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
dw[3] =
0;
- dw[4] =
- __gen_field(values->InlineData, 0, 31) |
- 0;
+ for (uint32_t i = 0, j = 4; i < 12; i += 1, j++) {
+ dw[j] =
+ __gen_field(values->InlineData[i + 0], 0, 31) |
+ 0;
+ }
}
.MediaCommandOpcode = 1, \
.SubOpcode = 3
+#define GEN8_MEDIA_OBJECT_WALKER_length 0x00000000
+
struct GEN8_MEDIA_OBJECT_WALKER {
uint32_t CommandType;
uint32_t Pipeline;
uint32_t SubOpcode;
uint32_t DwordLength;
uint32_t InterfaceDescriptorOffset;
- uint32_t ChildrenPresent;
+ bool ChildrenPresent;
#define Nothreadsynchronization 0
#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1
uint32_t ThreadSynchronization;
uint32_t IndirectDataLength;
uint32_t IndirectDataStartAddress;
uint32_t GroupIDLoopSelect;
- uint32_t ScoreboardMask;
+ bool ScoreboardMask;
uint32_t ColorCountMinusOne;
uint32_t MiddleLoopExtraSteps;
uint32_t LocalMidLoopUnitY;
static inline void
GEN8_MEDIA_OBJECT_WALKER_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MEDIA_OBJECT_WALKER * restrict values)
+ const struct GEN8_MEDIA_OBJECT_WALKER * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
/* variable length fields follow */
}
-#define GEN8_MEDIA_STATE_FLUSH_length 0x00000002
#define GEN8_MEDIA_STATE_FLUSH_length_bias 0x00000002
#define GEN8_MEDIA_STATE_FLUSH_header \
.CommandType = 3, \
.SubOpcode = 4, \
.DwordLength = 0
+#define GEN8_MEDIA_STATE_FLUSH_length 0x00000002
+
struct GEN8_MEDIA_STATE_FLUSH {
uint32_t CommandType;
uint32_t Pipeline;
uint32_t MediaCommandOpcode;
uint32_t SubOpcode;
uint32_t DwordLength;
- uint32_t FlushtoGO;
+ bool FlushtoGO;
uint32_t WatermarkRequired;
uint32_t InterfaceDescriptorOffset;
};
static inline void
GEN8_MEDIA_STATE_FLUSH_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MEDIA_STATE_FLUSH * restrict values)
+ const struct GEN8_MEDIA_STATE_FLUSH * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MEDIA_VFE_STATE_length 0x00000009
#define GEN8_MEDIA_VFE_STATE_length_bias 0x00000002
#define GEN8_MEDIA_VFE_STATE_header \
.CommandType = 3, \
.SubOpcode = 0, \
.DwordLength = 7
+#define GEN8_MEDIA_VFE_STATE_length 0x00000009
+
struct GEN8_MEDIA_VFE_STATE {
uint32_t CommandType;
uint32_t Pipeline;
static inline void
GEN8_MEDIA_VFE_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MEDIA_VFE_STATE * restrict values)
+ const struct GEN8_MEDIA_VFE_STATE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_ARB_CHECK_length 0x00000001
#define GEN8_MI_ARB_CHECK_length_bias 0x00000001
#define GEN8_MI_ARB_CHECK_header \
.CommandType = 0, \
.MICommandOpcode = 5
+#define GEN8_MI_ARB_CHECK_length 0x00000001
+
struct GEN8_MI_ARB_CHECK {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_ARB_CHECK_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_ARB_CHECK * restrict values)
+ const struct GEN8_MI_ARB_CHECK * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_BATCH_BUFFER_END_length 0x00000001
#define GEN8_MI_BATCH_BUFFER_END_length_bias 0x00000001
#define GEN8_MI_BATCH_BUFFER_END_header \
.CommandType = 0, \
.MICommandOpcode = 10
+#define GEN8_MI_BATCH_BUFFER_END_length 0x00000001
+
struct GEN8_MI_BATCH_BUFFER_END {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_BATCH_BUFFER_END * restrict values)
+ const struct GEN8_MI_BATCH_BUFFER_END * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_BATCH_BUFFER_START_length 0x00000003
#define GEN8_MI_BATCH_BUFFER_START_length_bias 0x00000002
#define GEN8_MI_BATCH_BUFFER_START_header \
.CommandType = 0, \
.MICommandOpcode = 49, \
.DwordLength = 1
+#define GEN8_MI_BATCH_BUFFER_START_length 0x00000003
+
struct GEN8_MI_BATCH_BUFFER_START {
uint32_t CommandType;
uint32_t MICommandOpcode;
#define _1stlevelbatch 0
#define _2ndlevelbatch 1
uint32_t _2ndLevelBatchBuffer;
- uint32_t AddOffsetEnable;
+ bool AddOffsetEnable;
uint32_t PredicationEnable;
- uint32_t ResourceStreamerEnable;
+ bool ResourceStreamerEnable;
#define ASI_GGTT 0
#define ASI_PPGTT 1
uint32_t AddressSpaceIndicator;
uint32_t DwordLength;
__gen_address_type BatchBufferStartAddress;
- __gen_address_type BatchBufferStartAddressHigh;
};
static inline void
GEN8_MI_BATCH_BUFFER_START_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_BATCH_BUFFER_START * restrict values)
+ const struct GEN8_MI_BATCH_BUFFER_START * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
uint32_t dw1 =
0;
- dw[1] =
+ uint64_t qw1 =
__gen_combine_address(data, &dw[1], values->BatchBufferStartAddress, dw1);
- uint32_t dw2 =
- 0;
-
- dw[2] =
- __gen_combine_address(data, &dw[2], values->BatchBufferStartAddressHigh, dw2);
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
}
.CommandType = 0, \
.MICommandOpcode = 39
+#define GEN8_MI_CLFLUSH_length 0x00000000
+
struct GEN8_MI_CLFLUSH {
uint32_t CommandType;
uint32_t MICommandOpcode;
uint32_t DwordLength;
__gen_address_type PageBaseAddress;
uint32_t StartingCachelineOffset;
- __gen_address_type PageBaseAddressHigh;
/* variable length fields follow */
};
static inline void
GEN8_MI_CLFLUSH_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_CLFLUSH * restrict values)
+ const struct GEN8_MI_CLFLUSH * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->StartingCachelineOffset, 6, 11) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_combine_address(data, &dw[1], values->PageBaseAddress, dw1);
- uint32_t dw2 =
- 0;
-
- dw[2] =
- __gen_combine_address(data, &dw[2], values->PageBaseAddressHigh, dw2);
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
/* variable length fields follow */
}
-#define GEN8_MI_CONDITIONAL_BATCH_BUFFER_END_length 0x00000003
#define GEN8_MI_CONDITIONAL_BATCH_BUFFER_END_length_bias 0x00000002
#define GEN8_MI_CONDITIONAL_BATCH_BUFFER_END_header\
.CommandType = 0, \
.CompareSemaphore = 0, \
.DwordLength = 1
+#define GEN8_MI_CONDITIONAL_BATCH_BUFFER_END_length 0x00000003
+
struct GEN8_MI_CONDITIONAL_BATCH_BUFFER_END {
uint32_t CommandType;
uint32_t MICommandOpcode;
uint32_t DwordLength;
uint32_t CompareDataDword;
__gen_address_type CompareAddress;
- __gen_address_type CompareAddressHigh;
};
static inline void
GEN8_MI_CONDITIONAL_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_CONDITIONAL_BATCH_BUFFER_END * restrict values)
+ const struct GEN8_MI_CONDITIONAL_BATCH_BUFFER_END * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->CompareAddress, dw2);
- uint32_t dw3 =
- 0;
-
- dw[3] =
- __gen_combine_address(data, &dw[3], values->CompareAddressHigh, dw3);
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
}
-#define GEN8_MI_COPY_MEM_MEM_length 0x00000005
#define GEN8_MI_COPY_MEM_MEM_length_bias 0x00000002
#define GEN8_MI_COPY_MEM_MEM_header \
.CommandType = 0, \
.MICommandOpcode = 46, \
.DwordLength = 3
+#define GEN8_MI_COPY_MEM_MEM_length 0x00000005
+
struct GEN8_MI_COPY_MEM_MEM {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_COPY_MEM_MEM_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_COPY_MEM_MEM * restrict values)
+ const struct GEN8_MI_COPY_MEM_MEM * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
uint32_t dw1 =
0;
- dw[1] =
+ uint64_t qw1 =
__gen_combine_address(data, &dw[1], values->DestinationMemoryAddress, dw1);
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
uint32_t dw3 =
0;
- dw[3] =
+ uint64_t qw3 =
__gen_combine_address(data, &dw[3], values->SourceMemoryAddress, dw3);
+ dw[3] = qw3;
+ dw[4] = qw3 >> 32;
+
}
-#define GEN8_MI_LOAD_REGISTER_IMM_length 0x00000003
#define GEN8_MI_LOAD_REGISTER_IMM_length_bias 0x00000002
#define GEN8_MI_LOAD_REGISTER_IMM_header \
.CommandType = 0, \
.MICommandOpcode = 34, \
.DwordLength = 1
+#define GEN8_MI_LOAD_REGISTER_IMM_length 0x00000003
+
struct GEN8_MI_LOAD_REGISTER_IMM {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_LOAD_REGISTER_IMM_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_LOAD_REGISTER_IMM * restrict values)
+ const struct GEN8_MI_LOAD_REGISTER_IMM * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
0;
dw[1] =
- __gen_field(values->RegisterOffset, 2, 22) |
+ __gen_offset(values->RegisterOffset, 2, 22) |
0;
dw[2] =
}
-#define GEN8_MI_LOAD_REGISTER_MEM_length 0x00000004
#define GEN8_MI_LOAD_REGISTER_MEM_length_bias 0x00000002
#define GEN8_MI_LOAD_REGISTER_MEM_header \
.CommandType = 0, \
.MICommandOpcode = 41, \
.DwordLength = 2
+#define GEN8_MI_LOAD_REGISTER_MEM_length 0x00000004
+
struct GEN8_MI_LOAD_REGISTER_MEM {
uint32_t CommandType;
uint32_t MICommandOpcode;
- uint32_t UseGlobalGTT;
+ bool UseGlobalGTT;
uint32_t AsyncModeEnable;
uint32_t DwordLength;
uint32_t RegisterAddress;
static inline void
GEN8_MI_LOAD_REGISTER_MEM_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_LOAD_REGISTER_MEM * restrict values)
+ const struct GEN8_MI_LOAD_REGISTER_MEM * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
0;
dw[1] =
- __gen_field(values->RegisterAddress, 2, 22) |
+ __gen_offset(values->RegisterAddress, 2, 22) |
0;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->MemoryAddress, dw2);
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
+
}
-#define GEN8_MI_LOAD_SCAN_LINES_EXCL_length 0x00000002
#define GEN8_MI_LOAD_SCAN_LINES_EXCL_length_bias 0x00000002
#define GEN8_MI_LOAD_SCAN_LINES_EXCL_header \
.CommandType = 0, \
.MICommandOpcode = 19, \
.DwordLength = 0
+#define GEN8_MI_LOAD_SCAN_LINES_EXCL_length 0x00000002
+
struct GEN8_MI_LOAD_SCAN_LINES_EXCL {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_LOAD_SCAN_LINES_EXCL_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_LOAD_SCAN_LINES_EXCL * restrict values)
+ const struct GEN8_MI_LOAD_SCAN_LINES_EXCL * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_LOAD_SCAN_LINES_INCL_length 0x00000002
#define GEN8_MI_LOAD_SCAN_LINES_INCL_length_bias 0x00000002
#define GEN8_MI_LOAD_SCAN_LINES_INCL_header \
.CommandType = 0, \
.MICommandOpcode = 18, \
.DwordLength = 0
+#define GEN8_MI_LOAD_SCAN_LINES_INCL_length 0x00000002
+
struct GEN8_MI_LOAD_SCAN_LINES_INCL {
uint32_t CommandType;
uint32_t MICommandOpcode;
#define NeverForward 0
#define AlwaysForward 1
#define ConditionallyForward 2
- uint32_t ScanLineEventDoneForward;
+ bool ScanLineEventDoneForward;
uint32_t DwordLength;
uint32_t StartScanLineNumber;
uint32_t EndScanLineNumber;
static inline void
GEN8_MI_LOAD_SCAN_LINES_INCL_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_LOAD_SCAN_LINES_INCL * restrict values)
+ const struct GEN8_MI_LOAD_SCAN_LINES_INCL * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_LOAD_URB_MEM_length 0x00000004
#define GEN8_MI_LOAD_URB_MEM_length_bias 0x00000002
#define GEN8_MI_LOAD_URB_MEM_header \
.CommandType = 0, \
.MICommandOpcode = 44, \
.DwordLength = 2
+#define GEN8_MI_LOAD_URB_MEM_length 0x00000004
+
struct GEN8_MI_LOAD_URB_MEM {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_LOAD_URB_MEM_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_LOAD_URB_MEM * restrict values)
+ const struct GEN8_MI_LOAD_URB_MEM * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->MemoryAddress, dw2);
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
+
}
#define GEN8_MI_MATH_length_bias 0x00000002
.CommandType = 0, \
.MICommandOpcode = 26
+#define GEN8_MI_MATH_length 0x00000000
+
struct GEN8_MI_MATH {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_MATH_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_MATH * restrict values)
+ const struct GEN8_MI_MATH * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
/* variable length fields follow */
}
-#define GEN8_MI_NOOP_length 0x00000001
#define GEN8_MI_NOOP_length_bias 0x00000001
#define GEN8_MI_NOOP_header \
.CommandType = 0, \
.MICommandOpcode = 0
-struct GEN8_MI_NOOP {
+#define GEN8_MI_NOOP_length 0x00000001
+
+struct GEN8_MI_NOOP {
uint32_t CommandType;
uint32_t MICommandOpcode;
- uint32_t IdentificationNumberRegisterWriteEnable;
+ bool IdentificationNumberRegisterWriteEnable;
uint32_t IdentificationNumber;
};
static inline void
GEN8_MI_NOOP_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_NOOP * restrict values)
+ const struct GEN8_MI_NOOP * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_PREDICATE_length 0x00000001
#define GEN8_MI_PREDICATE_length_bias 0x00000001
#define GEN8_MI_PREDICATE_header \
.CommandType = 0, \
.MICommandOpcode = 12
+#define GEN8_MI_PREDICATE_length 0x00000001
+
struct GEN8_MI_PREDICATE {
uint32_t CommandType;
uint32_t MICommandOpcode;
-#define KEEP 0
-#define LOAD 2
-#define LOADINV 3
+#define LOAD_KEEP 0
+#define LOAD_LOAD 2
+#define LOAD_LOADINV 3
uint32_t LoadOperation;
#define COMBINE_SET 0
#define COMBINE_AND 1
static inline void
GEN8_MI_PREDICATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_PREDICATE * restrict values)
+ const struct GEN8_MI_PREDICATE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_REPORT_HEAD_length 0x00000001
#define GEN8_MI_REPORT_HEAD_length_bias 0x00000001
#define GEN8_MI_REPORT_HEAD_header \
.CommandType = 0, \
.MICommandOpcode = 7
+#define GEN8_MI_REPORT_HEAD_length 0x00000001
+
struct GEN8_MI_REPORT_HEAD {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_REPORT_HEAD_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_REPORT_HEAD * restrict values)
+ const struct GEN8_MI_REPORT_HEAD * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_RS_CONTEXT_length 0x00000001
#define GEN8_MI_RS_CONTEXT_length_bias 0x00000001
#define GEN8_MI_RS_CONTEXT_header \
.CommandType = 0, \
.MICommandOpcode = 15
+#define GEN8_MI_RS_CONTEXT_length 0x00000001
+
struct GEN8_MI_RS_CONTEXT {
uint32_t CommandType;
uint32_t MICommandOpcode;
-#define Restore 0
-#define Save 1
+#define RS_RESTORE 0
+#define RS_SAVE 1
uint32_t ResourceStreamerSave;
};
static inline void
GEN8_MI_RS_CONTEXT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_RS_CONTEXT * restrict values)
+ const struct GEN8_MI_RS_CONTEXT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_RS_CONTROL_length 0x00000001
#define GEN8_MI_RS_CONTROL_length_bias 0x00000001
#define GEN8_MI_RS_CONTROL_header \
.CommandType = 0, \
.MICommandOpcode = 6
+#define GEN8_MI_RS_CONTROL_length 0x00000001
+
struct GEN8_MI_RS_CONTROL {
uint32_t CommandType;
uint32_t MICommandOpcode;
-#define Stop 0
-#define Start 1
+#define RS_STOP 0
+#define RS_START 1
uint32_t ResourceStreamerControl;
};
static inline void
GEN8_MI_RS_CONTROL_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_RS_CONTROL * restrict values)
+ const struct GEN8_MI_RS_CONTROL * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_RS_STORE_DATA_IMM_length 0x00000004
#define GEN8_MI_RS_STORE_DATA_IMM_length_bias 0x00000002
#define GEN8_MI_RS_STORE_DATA_IMM_header \
.CommandType = 0, \
.MICommandOpcode = 43, \
.DwordLength = 2
+#define GEN8_MI_RS_STORE_DATA_IMM_length 0x00000004
+
struct GEN8_MI_RS_STORE_DATA_IMM {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_RS_STORE_DATA_IMM_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_RS_STORE_DATA_IMM * restrict values)
+ const struct GEN8_MI_RS_STORE_DATA_IMM * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->CoreModeEnable, 0, 0) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_combine_address(data, &dw[1], values->DestinationAddress, dw1);
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
dw[3] =
__gen_field(values->DataDWord0, 0, 31) |
0;
}
-#define GEN8_MI_SET_CONTEXT_length 0x00000002
#define GEN8_MI_SET_CONTEXT_length_bias 0x00000002
#define GEN8_MI_SET_CONTEXT_header \
.CommandType = 0, \
.MICommandOpcode = 24, \
.DwordLength = 0
+#define GEN8_MI_SET_CONTEXT_length 0x00000002
+
struct GEN8_MI_SET_CONTEXT {
uint32_t CommandType;
uint32_t MICommandOpcode;
uint32_t DwordLength;
__gen_address_type LogicalContextAddress;
uint32_t ReservedMustbe1;
- uint32_t CoreModeEnable;
- uint32_t ResourceStreamerStateSaveEnable;
- uint32_t ResourceStreamerStateRestoreEnable;
+ bool CoreModeEnable;
+ bool ResourceStreamerStateSaveEnable;
+ bool ResourceStreamerStateRestoreEnable;
uint32_t ForceRestore;
uint32_t RestoreInhibit;
};
static inline void
GEN8_MI_SET_CONTEXT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_SET_CONTEXT * restrict values)
+ const struct GEN8_MI_SET_CONTEXT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_SET_PREDICATE_length 0x00000001
#define GEN8_MI_SET_PREDICATE_length_bias 0x00000001
#define GEN8_MI_SET_PREDICATE_header \
.CommandType = 0, \
.MICommandOpcode = 1
+#define GEN8_MI_SET_PREDICATE_length 0x00000001
+
struct GEN8_MI_SET_PREDICATE {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_SET_PREDICATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_SET_PREDICATE * restrict values)
+ const struct GEN8_MI_SET_PREDICATE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_STORE_DATA_IMM_length 0x00000004
#define GEN8_MI_STORE_DATA_IMM_length_bias 0x00000002
#define GEN8_MI_STORE_DATA_IMM_header \
.CommandType = 0, \
.MICommandOpcode = 32, \
.DwordLength = 2
+#define GEN8_MI_STORE_DATA_IMM_length 0x00000004
+
struct GEN8_MI_STORE_DATA_IMM {
uint32_t CommandType;
uint32_t MICommandOpcode;
- uint32_t UseGlobalGTT;
- uint32_t StoreQword;
+ bool UseGlobalGTT;
+ bool StoreQword;
uint32_t DwordLength;
__gen_address_type Address;
uint32_t CoreModeEnable;
static inline void
GEN8_MI_STORE_DATA_IMM_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_STORE_DATA_IMM * restrict values)
+ const struct GEN8_MI_STORE_DATA_IMM * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->CoreModeEnable, 0, 0) |
0;
- dw[1] =
+ uint64_t qw1 =
__gen_combine_address(data, &dw[1], values->Address, dw1);
+ dw[1] = qw1;
+ dw[2] = qw1 >> 32;
+
dw[3] =
__gen_field(values->DataDWord0, 0, 31) |
0;
}
-#define GEN8_MI_STORE_DATA_INDEX_length 0x00000003
#define GEN8_MI_STORE_DATA_INDEX_length_bias 0x00000002
#define GEN8_MI_STORE_DATA_INDEX_header \
.CommandType = 0, \
.MICommandOpcode = 33, \
.DwordLength = 1
+#define GEN8_MI_STORE_DATA_INDEX_length 0x00000003
+
struct GEN8_MI_STORE_DATA_INDEX {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_STORE_DATA_INDEX_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_STORE_DATA_INDEX * restrict values)
+ const struct GEN8_MI_STORE_DATA_INDEX * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_STORE_URB_MEM_length 0x00000004
#define GEN8_MI_STORE_URB_MEM_length_bias 0x00000002
#define GEN8_MI_STORE_URB_MEM_header \
.CommandType = 0, \
.MICommandOpcode = 45, \
.DwordLength = 2
+#define GEN8_MI_STORE_URB_MEM_length 0x00000004
+
struct GEN8_MI_STORE_URB_MEM {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_STORE_URB_MEM_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_STORE_URB_MEM * restrict values)
+ const struct GEN8_MI_STORE_URB_MEM * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->MemoryAddress, dw2);
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
+
}
-#define GEN8_MI_SUSPEND_FLUSH_length 0x00000001
#define GEN8_MI_SUSPEND_FLUSH_length_bias 0x00000001
#define GEN8_MI_SUSPEND_FLUSH_header \
.CommandType = 0, \
.MICommandOpcode = 11
+#define GEN8_MI_SUSPEND_FLUSH_length 0x00000001
+
struct GEN8_MI_SUSPEND_FLUSH {
uint32_t CommandType;
uint32_t MICommandOpcode;
- uint32_t SuspendFlush;
+ bool SuspendFlush;
};
static inline void
GEN8_MI_SUSPEND_FLUSH_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_SUSPEND_FLUSH * restrict values)
+ const struct GEN8_MI_SUSPEND_FLUSH * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_TOPOLOGY_FILTER_length 0x00000001
#define GEN8_MI_TOPOLOGY_FILTER_length_bias 0x00000001
#define GEN8_MI_TOPOLOGY_FILTER_header \
.CommandType = 0, \
.MICommandOpcode = 13
+#define GEN8_MI_TOPOLOGY_FILTER_length 0x00000001
+
struct GEN8_MI_TOPOLOGY_FILTER {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_TOPOLOGY_FILTER_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_TOPOLOGY_FILTER * restrict values)
+ const struct GEN8_MI_TOPOLOGY_FILTER * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
.CommandType = 0, \
.MICommandOpcode = 35
+#define GEN8_MI_UPDATE_GTT_length 0x00000000
+
struct GEN8_MI_UPDATE_GTT {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_UPDATE_GTT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_UPDATE_GTT * restrict values)
+ const struct GEN8_MI_UPDATE_GTT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
/* variable length fields follow */
}
-#define GEN8_MI_URB_ATOMIC_ALLOC_length 0x00000001
#define GEN8_MI_URB_ATOMIC_ALLOC_length_bias 0x00000001
#define GEN8_MI_URB_ATOMIC_ALLOC_header \
.CommandType = 0, \
.MICommandOpcode = 9
+#define GEN8_MI_URB_ATOMIC_ALLOC_length 0x00000001
+
struct GEN8_MI_URB_ATOMIC_ALLOC {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_URB_ATOMIC_ALLOC_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_URB_ATOMIC_ALLOC * restrict values)
+ const struct GEN8_MI_URB_ATOMIC_ALLOC * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_URB_CLEAR_length 0x00000002
#define GEN8_MI_URB_CLEAR_length_bias 0x00000002
#define GEN8_MI_URB_CLEAR_header \
.CommandType = 0, \
.MICommandOpcode = 25, \
.DwordLength = 0
+#define GEN8_MI_URB_CLEAR_length 0x00000002
+
struct GEN8_MI_URB_CLEAR {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_URB_CLEAR_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_URB_CLEAR * restrict values)
+ const struct GEN8_MI_URB_CLEAR * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
dw[1] =
__gen_field(values->URBClearLength, 16, 29) |
- __gen_field(values->URBAddress, 0, 14) |
+ __gen_offset(values->URBAddress, 0, 14) |
0;
}
-#define GEN8_MI_USER_INTERRUPT_length 0x00000001
#define GEN8_MI_USER_INTERRUPT_length_bias 0x00000001
#define GEN8_MI_USER_INTERRUPT_header \
.CommandType = 0, \
.MICommandOpcode = 2
+#define GEN8_MI_USER_INTERRUPT_length 0x00000001
+
struct GEN8_MI_USER_INTERRUPT {
uint32_t CommandType;
uint32_t MICommandOpcode;
static inline void
GEN8_MI_USER_INTERRUPT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_USER_INTERRUPT * restrict values)
+ const struct GEN8_MI_USER_INTERRUPT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_MI_WAIT_FOR_EVENT_length 0x00000001
#define GEN8_MI_WAIT_FOR_EVENT_length_bias 0x00000001
#define GEN8_MI_WAIT_FOR_EVENT_header \
.CommandType = 0, \
.MICommandOpcode = 3
+#define GEN8_MI_WAIT_FOR_EVENT_length 0x00000001
+
struct GEN8_MI_WAIT_FOR_EVENT {
uint32_t CommandType;
uint32_t MICommandOpcode;
- uint32_t DisplayPipeCVerticalBlankWaitEnable;
- uint32_t DisplaySpriteCFlipPendingWaitEnable;
- uint32_t DisplayPlaneCFlipPendingWaitEnable;
- uint32_t DisplayPipeCScanLineWaitEnable;
- uint32_t DisplayPipeBVerticalBlankWaitEnable;
- uint32_t DisplaySpriteBFlipPendingWaitEnable;
- uint32_t DisplayPlaneBFlipPendingWaitEnable;
- uint32_t DisplayPipeBScanLineWaitEnable;
- uint32_t DisplayPipeAVerticalBlankWaitEnable;
- uint32_t DisplaySpriteAFlipPendingWaitEnable;
- uint32_t DisplayPlaneAFlipPendingWaitEnable;
- uint32_t DisplayPipeAScanLineWaitEnable;
+ bool DisplayPipeCVerticalBlankWaitEnable;
+ bool DisplaySpriteCFlipPendingWaitEnable;
+ bool DisplayPlaneCFlipPendingWaitEnable;
+ bool DisplayPipeCScanLineWaitEnable;
+ bool DisplayPipeBVerticalBlankWaitEnable;
+ bool DisplaySpriteBFlipPendingWaitEnable;
+ bool DisplayPlaneBFlipPendingWaitEnable;
+ bool DisplayPipeBScanLineWaitEnable;
+ bool DisplayPipeAVerticalBlankWaitEnable;
+ bool DisplaySpriteAFlipPendingWaitEnable;
+ bool DisplayPlaneAFlipPendingWaitEnable;
+ bool DisplayPipeAScanLineWaitEnable;
};
static inline void
GEN8_MI_WAIT_FOR_EVENT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_MI_WAIT_FOR_EVENT * restrict values)
+ const struct GEN8_MI_WAIT_FOR_EVENT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-#define GEN8_PIPE_CONTROL_length 0x00000006
#define GEN8_PIPE_CONTROL_length_bias 0x00000002
#define GEN8_PIPE_CONTROL_header \
.CommandType = 3, \
._3DCommandSubOpcode = 0, \
.DwordLength = 4
+#define GEN8_PIPE_CONTROL_length 0x00000006
+
struct GEN8_PIPE_CONTROL {
uint32_t CommandType;
uint32_t CommandSubType;
#define Reset 1
uint32_t GlobalSnapshotCountReset;
uint32_t TLBInvalidate;
- uint32_t GenericMediaStateClear;
+ bool GenericMediaStateClear;
#define NoWrite 0
#define WriteImmediateData 1
#define WritePSDepthCount 2
#define WriteTimestamp 3
uint32_t PostSyncOperation;
- uint32_t DepthStallEnable;
+ bool DepthStallEnable;
#define DisableFlush 0
#define EnableFlush 1
- uint32_t RenderTargetCacheFlushEnable;
- uint32_t InstructionCacheInvalidateEnable;
- uint32_t TextureCacheInvalidationEnable;
- uint32_t IndirectStatePointersDisable;
- uint32_t NotifyEnable;
- uint32_t PipeControlFlushEnable;
- uint32_t DCFlushEnable;
- uint32_t VFCacheInvalidationEnable;
- uint32_t ConstantCacheInvalidationEnable;
- uint32_t StateCacheInvalidationEnable;
- uint32_t StallAtPixelScoreboard;
+ bool RenderTargetCacheFlushEnable;
+ bool InstructionCacheInvalidateEnable;
+ bool TextureCacheInvalidationEnable;
+ bool IndirectStatePointersDisable;
+ bool NotifyEnable;
+ bool PipeControlFlushEnable;
+ bool DCFlushEnable;
+ bool VFCacheInvalidationEnable;
+ bool ConstantCacheInvalidationEnable;
+ bool StateCacheInvalidationEnable;
+ bool StallAtPixelScoreboard;
#define FlushDisabled 0
#define FlushEnabled 1
- uint32_t DepthCacheFlushEnable;
+ bool DepthCacheFlushEnable;
__gen_address_type Address;
- __gen_address_type AddressHigh;
- uint32_t ImmediateData;
+ uint64_t ImmediateData;
};
static inline void
GEN8_PIPE_CONTROL_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_PIPE_CONTROL * restrict values)
+ const struct GEN8_PIPE_CONTROL * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
uint32_t dw2 =
0;
- dw[2] =
+ uint64_t qw2 =
__gen_combine_address(data, &dw[2], values->Address, dw2);
- uint32_t dw3 =
- 0;
+ dw[2] = qw2;
+ dw[3] = qw2 >> 32;
- dw[3] =
- __gen_combine_address(data, &dw[3], values->AddressHigh, dw3);
-
- dw[4] =
+ uint64_t qw4 =
__gen_field(values->ImmediateData, 0, 63) |
0;
-}
-
-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);
+ dw[4] = qw4;
+ dw[5] = qw4 >> 32;
}
-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;
-
-}
+#define GEN8_SCISSOR_RECT_length 0x00000002
struct GEN8_SCISSOR_RECT {
uint32_t ScissorRectangleYMin;
static inline void
GEN8_SCISSOR_RECT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_SCISSOR_RECT * restrict values)
+ const struct GEN8_SCISSOR_RECT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
+#define GEN8_SF_CLIP_VIEWPORT_length 0x00000010
+
struct GEN8_SF_CLIP_VIEWPORT {
float ViewportMatrixElementm00;
float ViewportMatrixElementm11;
static inline void
GEN8_SF_CLIP_VIEWPORT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_SF_CLIP_VIEWPORT * restrict values)
+ const struct GEN8_SF_CLIP_VIEWPORT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-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;
+#define GEN8_BLEND_STATE_length 0x00000011
-}
+#define GEN8_BLEND_STATE_ENTRY_length 0x00000002
struct GEN8_BLEND_STATE_ENTRY {
- uint32_t LogicOpEnable;
+ bool LogicOpEnable;
uint32_t LogicOpFunction;
uint32_t PreBlendSourceOnlyClampEnable;
#define COLORCLAMP_UNORM 0
#define COLORCLAMP_SNORM 1
#define COLORCLAMP_RTFORMAT 2
uint32_t ColorClampRange;
- uint32_t PreBlendColorClampEnable;
- uint32_t PostBlendColorClampEnable;
- uint32_t ColorBufferBlendEnable;
+ bool PreBlendColorClampEnable;
+ bool PostBlendColorClampEnable;
+ bool ColorBufferBlendEnable;
uint32_t SourceBlendFactor;
uint32_t DestinationBlendFactor;
uint32_t ColorBlendFunction;
uint32_t SourceAlphaBlendFactor;
uint32_t DestinationAlphaBlendFactor;
uint32_t AlphaBlendFunction;
- uint32_t WriteDisableAlpha;
- uint32_t WriteDisableRed;
- uint32_t WriteDisableGreen;
- uint32_t WriteDisableBlue;
+ bool WriteDisableAlpha;
+ bool WriteDisableRed;
+ bool WriteDisableGreen;
+ bool WriteDisableBlue;
};
static inline void
GEN8_BLEND_STATE_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_BLEND_STATE_ENTRY * restrict values)
+ const struct GEN8_BLEND_STATE_ENTRY * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
- dw[0] =
+ uint64_t qw0 =
__gen_field(values->LogicOpEnable, 63, 63) |
__gen_field(values->LogicOpFunction, 59, 62) |
__gen_field(values->PreBlendSourceOnlyClampEnable, 36, 36) |
__gen_field(values->WriteDisableBlue, 0, 0) |
0;
+ dw[0] = qw0;
+ dw[1] = qw0 >> 32;
+
+}
+
+struct GEN8_BLEND_STATE {
+ bool AlphaToCoverageEnable;
+ bool IndependentAlphaBlendEnable;
+ bool AlphaToOneEnable;
+ bool AlphaToCoverageDitherEnable;
+ bool AlphaTestEnable;
+ uint32_t AlphaTestFunction;
+ bool ColorDitherEnable;
+ uint32_t XDitherOffset;
+ uint32_t YDitherOffset;
+ struct GEN8_BLEND_STATE_ENTRY Entry[8];
+};
+
+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;
+
+ for (uint32_t i = 0, j = 1; i < 8; i++, j += 2)
+ GEN8_BLEND_STATE_ENTRY_pack(data, &dw[j], &values->Entry[i]);
}
+#define GEN8_CC_VIEWPORT_length 0x00000002
+
struct GEN8_CC_VIEWPORT {
float MinimumDepth;
float MaximumDepth;
static inline void
GEN8_CC_VIEWPORT_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_CC_VIEWPORT * restrict values)
+ const struct GEN8_CC_VIEWPORT * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
+#define GEN8_COLOR_CALC_STATE_length 0x00000006
+
struct GEN8_COLOR_CALC_STATE {
uint32_t StencilReferenceValue;
uint32_t BackFaceStencilReferenceValue;
static inline void
GEN8_COLOR_CALC_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_COLOR_CALC_STATE * restrict values)
+ const struct GEN8_COLOR_CALC_STATE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-struct GEN8_MEMORY_OBJECT_CONTROL_STATE {
+#define GEN8_BLACK_LEVEL_CORRECTION_STATE__DW7576_length 0x00000002
+
+struct GEN8_BLACK_LEVEL_CORRECTION_STATE__DW7576 {
+ uint32_t BlackPointOffsetR;
+ uint32_t BlackPointOffsetG;
+ uint32_t BlackPointOffsetB;
};
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)
+GEN8_BLACK_LEVEL_CORRECTION_STATE__DW7576_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_BLACK_LEVEL_CORRECTION_STATE__DW7576 * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
dw[0] =
+ __gen_field(values->BlackPointOffsetR, 0, 12) |
0;
-}
-
-struct GEN8_VEB_DI_IECP_COMMAND_SURFACE_CONTROL_BITS {
-#define UseCacheabilityControlsfrompagetableUCwithFenceifcoherentcycle 0
-#define UncacheableUCnoncacheable 1
-#define WritethroughWT 2
-#define WritebackWB 3
- uint32_t MemoryTypeLLCeLLCCacheabilityControlLeLLCCC;
-#define eLLCOnly 0
-#define LLCOnly 1
-#define LLCeLLCAllowed 2
-#define L3LLCeLLCAllowed 3
- uint32_t TargetCacheTC;
- uint32_t EncryptedData;
-#define PoorChance 3
-#define NormalChance 2
-#define BetterChance 1
-#define BestChance 0
- uint32_t AgeforQUADLRUAGE;
-};
-
-static inline void
-GEN8_VEB_DI_IECP_COMMAND_SURFACE_CONTROL_BITS_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_VEB_DI_IECP_COMMAND_SURFACE_CONTROL_BITS * restrict values)
-{
- uint32_t *dw = (uint32_t * restrict) dst;
-
- dw[0] =
- __gen_field(values->MemoryTypeLLCeLLCCacheabilityControlLeLLCCC, 5, 6) |
- __gen_field(values->TargetCacheTC, 3, 4) |
- __gen_field(values->EncryptedData, 2, 2) |
- __gen_field(values->AgeforQUADLRUAGE, 0, 1) |
+ dw[1] =
+ __gen_field(values->BlackPointOffsetG, 13, 25) |
+ __gen_field(values->BlackPointOffsetB, 0, 12) |
0;
}
+#define GEN8_INTERFACE_DESCRIPTOR_DATA_length 0x00000008
+
struct GEN8_INTERFACE_DESCRIPTOR_DATA {
uint32_t KernelStartPointer;
uint32_t KernelStartPointerHigh;
#define IEEE754 0
#define Alternate 1
uint32_t FloatingPointMode;
- uint32_t IllegalOpcodeExceptionEnable;
- uint32_t MaskStackExceptionEnable;
- uint32_t SoftwareExceptionEnable;
+ bool IllegalOpcodeExceptionEnable;
+ bool MaskStackExceptionEnable;
+ bool SoftwareExceptionEnable;
uint32_t SamplerStatePointer;
#define Nosamplersused 0
#define Between1and4samplersused 1
#define RD 2
#define RTZ 3
uint32_t RoundingMode;
- uint32_t BarrierEnable;
+ bool BarrierEnable;
#define Encodes0k 0
#define Encodes4k 1
#define Encodes8k 2
static inline void
GEN8_INTERFACE_DESCRIPTOR_DATA_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_INTERFACE_DESCRIPTOR_DATA * restrict values)
+ const struct GEN8_INTERFACE_DESCRIPTOR_DATA * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
}
-struct GEN8_PALETTE_ENTRY {
- uint32_t Alpha;
- uint32_t Red;
- uint32_t Green;
- uint32_t Blue;
+#define GEN8_BINDING_TABLE_STATE_length 0x00000001
+
+struct GEN8_BINDING_TABLE_STATE {
+ uint32_t SurfaceStatePointer;
};
static inline void
-GEN8_PALETTE_ENTRY_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_PALETTE_ENTRY * restrict values)
+GEN8_BINDING_TABLE_STATE_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_BINDING_TABLE_STATE * 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) |
+ __gen_offset(values->SurfaceStatePointer, 6, 31) |
0;
}
+#define GEN8_RENDER_SURFACE_STATE_length 0x00000010
+
struct GEN8_RENDER_SURFACE_STATE {
#define SURFTYPE_1D 0
#define SURFTYPE_2D 1
#define SURFTYPE_STRBUF 5
#define SURFTYPE_NULL 7
uint32_t SurfaceType;
- uint32_t SurfaceArray;
+ bool SurfaceArray;
uint32_t SurfaceFormat;
#define VALIGN4 1
#define VALIGN8 2
uint32_t TileMode;
uint32_t VerticalLineStride;
uint32_t VerticalLineStrideOffset;
- uint32_t SamplerL2BypassModeDisable;
+ bool SamplerL2BypassModeDisable;
#define WriteOnlyCache 0
#define ReadWriteCache 1
uint32_t RenderCacheReadWriteMode;
#define PROGRESSIVE_FRAME 2
#define INTERLACED_FRAME 3
uint32_t MediaBoundaryPixelMode;
- uint32_t CubeFaceEnablePositiveZ;
- uint32_t CubeFaceEnableNegativeZ;
- uint32_t CubeFaceEnablePositiveY;
- uint32_t CubeFaceEnableNegativeY;
- uint32_t CubeFaceEnablePositiveX;
- uint32_t CubeFaceEnableNegativeX;
- uint32_t MemoryObjectControlState;
- uint32_t BaseMipLevel;
+ bool CubeFaceEnablePositiveZ;
+ bool CubeFaceEnableNegativeZ;
+ bool CubeFaceEnablePositiveY;
+ bool CubeFaceEnableNegativeY;
+ bool CubeFaceEnablePositiveX;
+ bool CubeFaceEnableNegativeX;
+ struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState;
+ float BaseMipLevel;
uint32_t SurfaceQPitch;
uint32_t Height;
uint32_t Width;
uint32_t MultisamplePositionPaletteIndex;
uint32_t XOffset;
uint32_t YOffset;
- uint32_t EWADisableForCube;
+ bool EWADisableForCube;
#define GPUcoherent 0
#define IAcoherent 1
uint32_t CoherencyType;
#define AUX_APPEND 2
#define AUX_HIZ 3
uint32_t AuxiliarySurfaceMode;
- uint32_t SeparateUVPlaneEnable;
+ bool SeparateUVPlaneEnable;
uint32_t XOffsetforUorUVPlane;
uint32_t YOffsetforUorUVPlane;
uint32_t RedClearColor;
uint32_t ShaderChannelSelectGreen;
uint32_t ShaderChannelSelectBlue;
uint32_t ShaderChannelSelectAlpha;
- uint32_t ResourceMinLOD;
+ float ResourceMinLOD;
__gen_address_type SurfaceBaseAddress;
uint32_t XOffsetforVPlane;
uint32_t YOffsetforVPlane;
static inline void
GEN8_RENDER_SURFACE_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_RENDER_SURFACE_STATE * restrict values)
+ const struct GEN8_RENDER_SURFACE_STATE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__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 */
- __gen_field(values->BaseMipLevel, 19, 23) |
+ __gen_field(dw_MemoryObjectControlState, 24, 30) |
+ __gen_field(values->BaseMipLevel * (1 << 1), 19, 23) |
__gen_field(values->SurfaceQPitch, 0, 14) |
0;
__gen_field(values->ShaderChannelSelectGreen, 22, 24) |
__gen_field(values->ShaderChannelSelectBlue, 19, 21) |
__gen_field(values->ShaderChannelSelectAlpha, 16, 18) |
- __gen_field(values->ResourceMinLOD, 0, 11) |
+ __gen_field(values->ResourceMinLOD * (1 << 8), 0, 11) |
0;
uint32_t dw8 =
0;
- dw[8] =
+ uint64_t qw8 =
__gen_combine_address(data, &dw[8], values->SurfaceBaseAddress, dw8);
+ dw[8] = qw8;
+ dw[9] = qw8 >> 32;
+
uint32_t dw10 =
__gen_field(values->XOffsetforVPlane, 48, 61) |
__gen_field(values->YOffsetforVPlane, 32, 45) |
__gen_field(values->AuxiliaryTableIndexforMediaCompressedSurface, 21, 31) |
0;
- dw[10] =
+ uint64_t qw10 =
__gen_combine_address(data, &dw[10], values->AuxiliarySurfaceBaseAddress, dw10);
+ dw[10] = qw10;
+ dw[11] = qw10 >> 32;
+
dw[12] =
0;
}
+#define GEN8_FILTER_COEFFICIENT_length 0x00000001
+
+struct GEN8_FILTER_COEFFICIENT {
+ uint32_t FilterCoefficient;
+};
+
+static inline void
+GEN8_FILTER_COEFFICIENT_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_FILTER_COEFFICIENT * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->FilterCoefficient, 0, 7) |
+ 0;
+
+}
+
+#define GEN8_SAMPLER_STATE_length 0x00000004
+
struct GEN8_SAMPLER_STATE {
- uint32_t SamplerDisable;
+ bool SamplerDisable;
#define DX10OGL 0
#define DX9 1
uint32_t TextureBorderColorMode;
#define CLAMP_NONE 0
#define CLAMP_OGL 2
uint32_t LODPreClampMode;
- uint32_t BaseMipLevel;
+ float BaseMipLevel;
#define MIPFILTER_NONE 0
#define MIPFILTER_NEAREST 1
#define MIPFILTER_LINEAR 3
#define LEGACY 0
#define EWAApproximation 1
uint32_t AnisotropicAlgorithm;
- uint32_t MinLOD;
- uint32_t MaxLOD;
- uint32_t ChromaKeyEnable;
+ float MinLOD;
+ float MaxLOD;
+ bool ChromaKeyEnable;
uint32_t ChromaKeyIndex;
#define KEYFILTER_KILL_ON_ANY_MATCH 0
#define KEYFILTER_REPLACE_BLACK 1
#define RATIO141 6
#define RATIO161 7
uint32_t MaximumAnisotropy;
- uint32_t RAddressMinFilterRoundingEnable;
- uint32_t RAddressMagFilterRoundingEnable;
- uint32_t VAddressMinFilterRoundingEnable;
- uint32_t VAddressMagFilterRoundingEnable;
- uint32_t UAddressMinFilterRoundingEnable;
- uint32_t UAddressMagFilterRoundingEnable;
+ bool RAddressMinFilterRoundingEnable;
+ bool RAddressMagFilterRoundingEnable;
+ bool VAddressMinFilterRoundingEnable;
+ bool VAddressMagFilterRoundingEnable;
+ bool UAddressMinFilterRoundingEnable;
+ bool UAddressMagFilterRoundingEnable;
#define FULL 0
#define HIGH 1
#define MED 2
#define LOW 3
uint32_t TrilinearFilterQuality;
- uint32_t NonnormalizedCoordinateEnable;
+ bool NonnormalizedCoordinateEnable;
uint32_t TCXAddressControlMode;
uint32_t TCYAddressControlMode;
uint32_t TCZAddressControlMode;
static inline void
GEN8_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst,
- const struct GEN8_SAMPLER_STATE * restrict values)
+ const struct GEN8_SAMPLER_STATE * restrict values)
{
uint32_t *dw = (uint32_t * restrict) dst;
__gen_field(values->SamplerDisable, 31, 31) |
__gen_field(values->TextureBorderColorMode, 29, 29) |
__gen_field(values->LODPreClampMode, 27, 28) |
- __gen_field(values->BaseMipLevel, 22, 26) |
+ __gen_field(values->BaseMipLevel * (1 << 1), 22, 26) |
__gen_field(values->MipModeFilter, 20, 21) |
__gen_field(values->MagModeFilter, 17, 19) |
__gen_field(values->MinModeFilter, 14, 16) |
0;
dw[1] =
- __gen_field(values->MinLOD, 20, 31) |
- __gen_field(values->MaxLOD, 8, 19) |
+ __gen_field(values->MinLOD * (1 << 8), 20, 31) |
+ __gen_field(values->MaxLOD * (1 << 8), 8, 19) |
__gen_field(values->ChromaKeyEnable, 7, 7) |
__gen_field(values->ChromaKeyIndex, 5, 6) |
__gen_field(values->ChromaKeyMode, 4, 4) |
}
+#define GEN8_SAMPLER_STATE_8X8_AVS_COEFFICIENTS_length 0x00000008
+
+struct GEN8_SAMPLER_STATE_8X8_AVS_COEFFICIENTS {
+ uint32_t Table0YFilterCoefficientn1;
+ uint32_t Table0XFilterCoefficientn1;
+ uint32_t Table0YFilterCoefficientn0;
+ uint32_t Table0XFilterCoefficientn0;
+ uint32_t Table0YFilterCoefficientn3;
+ uint32_t Table0XFilterCoefficientn3;
+ uint32_t Table0YFilterCoefficientn2;
+ uint32_t Table0XFilterCoefficientn2;
+ uint32_t Table0YFilterCoefficientn5;
+ uint32_t Table0XFilterCoefficientn5;
+ uint32_t Table0YFilterCoefficientn4;
+ uint32_t Table0XFilterCoefficientn4;
+ uint32_t Table0YFilterCoefficientn7;
+ uint32_t Table0XFilterCoefficientn7;
+ uint32_t Table0YFilterCoefficientn6;
+ uint32_t Table0XFilterCoefficientn6;
+ uint32_t Table1XFilterCoefficientn3;
+ uint32_t Table1XFilterCoefficientn2;
+ uint32_t Table1XFilterCoefficientn5;
+ uint32_t Table1XFilterCoefficientn4;
+ uint32_t Table1YFilterCoefficientn3;
+ uint32_t Table1YFilterCoefficientn2;
+ uint32_t Table1YFilterCoefficientn5;
+ uint32_t Table1YFilterCoefficientn4;
+};
+
+static inline void
+GEN8_SAMPLER_STATE_8X8_AVS_COEFFICIENTS_pack(__gen_user_data *data, void * restrict dst,
+ const struct GEN8_SAMPLER_STATE_8X8_AVS_COEFFICIENTS * restrict values)
+{
+ uint32_t *dw = (uint32_t * restrict) dst;
+
+ dw[0] =
+ __gen_field(values->Table0YFilterCoefficientn1, 24, 31) |
+ __gen_field(values->Table0XFilterCoefficientn1, 16, 23) |
+ __gen_field(values->Table0YFilterCoefficientn0, 8, 15) |
+ __gen_field(values->Table0XFilterCoefficientn0, 0, 7) |
+ 0;
+
+ dw[1] =
+ __gen_field(values->Table0YFilterCoefficientn3, 24, 31) |
+ __gen_field(values->Table0XFilterCoefficientn3, 16, 23) |
+ __gen_field(values->Table0YFilterCoefficientn2, 8, 15) |
+ __gen_field(values->Table0XFilterCoefficientn2, 0, 7) |
+ 0;
+
+ dw[2] =
+ __gen_field(values->Table0YFilterCoefficientn5, 24, 31) |
+ __gen_field(values->Table0XFilterCoefficientn5, 16, 23) |
+ __gen_field(values->Table0YFilterCoefficientn4, 8, 15) |
+ __gen_field(values->Table0XFilterCoefficientn4, 0, 7) |
+ 0;
+
+ dw[3] =
+ __gen_field(values->Table0YFilterCoefficientn7, 24, 31) |
+ __gen_field(values->Table0XFilterCoefficientn7, 16, 23) |
+ __gen_field(values->Table0YFilterCoefficientn6, 8, 15) |
+ __gen_field(values->Table0XFilterCoefficientn6, 0, 7) |
+ 0;
+
+ dw[4] =
+ __gen_field(values->Table1XFilterCoefficientn3, 24, 31) |
+ __gen_field(values->Table1XFilterCoefficientn2, 16, 23) |
+ 0;
+
+ dw[5] =
+ __gen_field(values->Table1XFilterCoefficientn5, 8, 15) |
+ __gen_field(values->Table1XFilterCoefficientn4, 0, 7) |
+ 0;
+
+ dw[6] =
+ __gen_field(values->Table1YFilterCoefficientn3, 24, 31) |
+ __gen_field(values->Table1YFilterCoefficientn2, 16, 23) |
+ 0;
+
+ dw[7] =
+ __gen_field(values->Table1YFilterCoefficientn5, 8, 15) |
+ __gen_field(values->Table1YFilterCoefficientn4, 0, 7) |
+ 0;
+
+}
+
/* Enum 3D_Prim_Topo_Type */
#define _3DPRIM_POINTLIST 1
#define _3DPRIM_LINELIST 2
#define _3DPRIM_QUADLIST 7
#define _3DPRIM_QUADSTRIP 8
#define _3DPRIM_LINELIST_ADJ 9
-#define _3DPRIM_LISTSTRIP_ADJ 10
+#define _3DPRIM_LINESTRIP_ADJ 10
#define _3DPRIM_TRILIST_ADJ 11
#define _3DPRIM_TRISTRIP_ADJ 12
#define _3DPRIM_TRISTRIP_REVERSE 13
#define VFCOMP_STORE_PID 7
/* Enum WRAP_SHORTEST_ENABLE */
-#define X 1
-#define Y 2
-#define XY 3
-#define Z 4
-#define XZ 5
-#define YZ 6
-#define XYZ 7
-#define W 8
-#define XW 9
-#define YW 10
-#define XYW 11
-#define ZW 12
-#define XZW 13
-#define YZW 14
-#define XYZW 15
+#define WSE_X 1
+#define WSE_Y 2
+#define WSE_XY 3
+#define WSE_Z 4
+#define WSE_XZ 5
+#define WSE_YZ 6
+#define WSE_XYZ 7
+#define WSE_W 8
+#define WSE_XW 9
+#define WSE_YW 10
+#define WSE_XYW 11
+#define WSE_ZW 12
+#define WSE_XZW 13
+#define WSE_YZW 14
+#define WSE_XYZW 15
/* Enum 3D_Stencil_Operation */
#define STENCILOP_KEEP 0