From c325bb24b5b17ac94a7128335475ac82d20f4b35 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg=20Kristensen?= Date: Sun, 21 Jun 2015 23:47:10 -0700 Subject: [PATCH] vk: Pull in new generated headers The new headers use stdbool for enable/disable fields which implicitly converts expressions like (flags & 8) to 0 or 1. Also handles MBO (must-be-one) fields by setting them to one, corrects a bspec typo (_3DPRIM_LISTSTRIP_ADJ -> LINESTRIP) and makes a few enum values less clashy. --- src/vulkan/gen75_pack.h | 434 ++++++++++++++++---------------- src/vulkan/gen7_pack.h | 384 ++++++++++++++--------------- src/vulkan/gen8_pack.h | 532 ++++++++++++++++++++-------------------- src/vulkan/pipeline.c | 2 +- 4 files changed, 675 insertions(+), 677 deletions(-) diff --git a/src/vulkan/gen75_pack.h b/src/vulkan/gen75_pack.h index 5d89a44efa5..9ea8c2bcf65 100644 --- a/src/vulkan/gen75_pack.h +++ b/src/vulkan/gen75_pack.h @@ -184,7 +184,7 @@ GEN75_GPGPU_CSR_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst, struct GEN75_MI_STORE_REGISTER_MEM { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t UseGlobalGTT; + bool UseGlobalGTT; uint32_t PredicateEnable; uint32_t DwordLength; uint32_t RegisterAddress; @@ -288,27 +288,27 @@ struct GEN75_STATE_BASE_ADDRESS { __gen_address_type GeneralStateBaseAddress; struct GEN75_MEMORY_OBJECT_CONTROL_STATE GeneralStateMemoryObjectControlState; struct GEN75_MEMORY_OBJECT_CONTROL_STATE StatelessDataPortAccessMemoryObjectControlState; - uint32_t GeneralStateBaseAddressModifyEnable; + bool GeneralStateBaseAddressModifyEnable; __gen_address_type SurfaceStateBaseAddress; struct GEN75_MEMORY_OBJECT_CONTROL_STATE SurfaceStateMemoryObjectControlState; - uint32_t SurfaceStateBaseAddressModifyEnable; + bool SurfaceStateBaseAddressModifyEnable; __gen_address_type DynamicStateBaseAddress; struct GEN75_MEMORY_OBJECT_CONTROL_STATE DynamicStateMemoryObjectControlState; - uint32_t DynamicStateBaseAddressModifyEnable; + bool DynamicStateBaseAddressModifyEnable; __gen_address_type IndirectObjectBaseAddress; struct GEN75_MEMORY_OBJECT_CONTROL_STATE IndirectObjectMemoryObjectControlState; - uint32_t IndirectObjectBaseAddressModifyEnable; + bool IndirectObjectBaseAddressModifyEnable; __gen_address_type InstructionBaseAddress; struct GEN75_MEMORY_OBJECT_CONTROL_STATE InstructionMemoryObjectControlState; - uint32_t InstructionBaseAddressModifyEnable; + bool InstructionBaseAddressModifyEnable; __gen_address_type GeneralStateAccessUpperBound; - uint32_t GeneralStateAccessUpperBoundModifyEnable; + bool GeneralStateAccessUpperBoundModifyEnable; __gen_address_type DynamicStateAccessUpperBound; - uint32_t DynamicStateAccessUpperBoundModifyEnable; + bool DynamicStateAccessUpperBoundModifyEnable; __gen_address_type IndirectObjectAccessUpperBound; - uint32_t IndirectObjectAccessUpperBoundModifyEnable; + bool IndirectObjectAccessUpperBoundModifyEnable; __gen_address_type InstructionAccessUpperBound; - uint32_t InstructionAccessUpperBoundModifyEnable; + bool InstructionAccessUpperBoundModifyEnable; }; static inline void @@ -546,11 +546,11 @@ struct GEN75_3DPRIMITIVE { 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; @@ -1272,7 +1272,7 @@ struct GEN75_3DSTATE_CLEAR_PARAMS { uint32_t _3DCommandSubOpcode; uint32_t DwordLength; uint32_t DepthClearValue; - uint32_t DepthClearValueValid; + bool DepthClearValueValid; }; static inline void @@ -1316,27 +1316,27 @@ struct GEN75_3DSTATE_CLIP { uint32_t DwordLength; uint32_t FrontWinding; uint32_t VertexSubPixelPrecisionSelect; - uint32_t EarlyCullEnable; + bool EarlyCullEnable; #define CULLMODE_BOTH 0 #define CULLMODE_NONE 1 #define CULLMODE_FRONT 2 #define CULLMODE_BACK 3 uint32_t CullMode; - uint32_t ClipperStatisticsEnable; + bool ClipperStatisticsEnable; uint32_t UserClipDistanceCullTestEnableBitmask; - uint32_t ClipEnable; + bool ClipEnable; #define APIMODE_OGL 0 uint32_t APIMode; - uint32_t ViewportXYClipTestEnable; - uint32_t ViewportZClipTestEnable; - uint32_t GuardbandClipTestEnable; + bool ViewportXYClipTestEnable; + bool ViewportZClipTestEnable; + bool GuardbandClipTestEnable; uint32_t UserClipDistanceClipTestEnableBitmask; #define CLIPMODE_NORMAL 0 #define CLIPMODE_REJECT_ALL 3 #define CLIPMODE_ACCEPT_ALL 4 uint32_t ClipMode; - uint32_t PerspectiveDivideDisable; - uint32_t NonPerspectiveBarycentricEnable; + bool PerspectiveDivideDisable; + bool NonPerspectiveBarycentricEnable; #define Vertex0 0 #define Vertex1 1 #define Vertex2 2 @@ -1350,7 +1350,7 @@ struct GEN75_3DSTATE_CLIP { uint32_t TriangleFanProvokingVertexSelect; float MinimumPointWidth; float MaximumPointWidth; - uint32_t ForceZeroRTAIndexEnable; + bool ForceZeroRTAIndexEnable; uint32_t MaximumVPIndex; }; @@ -1654,9 +1654,9 @@ struct GEN75_3DSTATE_DEPTH_BUFFER { #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 @@ -1862,19 +1862,19 @@ struct GEN75_3DSTATE_DS { #define IEEE754 0 #define Alternate 1 uint32_t FloatingPointMode; - uint32_t AccessesUAV; - uint32_t IllegalOpcodeExceptionEnable; - uint32_t SoftwareExceptionEnable; + bool AccessesUAV; + bool IllegalOpcodeExceptionEnable; + bool SoftwareExceptionEnable; uint32_t ScratchSpaceBasePointer; uint32_t PerThreadScratchSpace; uint32_t DispatchGRFStartRegisterForURBData; uint32_t PatchURBEntryReadLength; uint32_t PatchURBEntryReadOffset; uint32_t MaximumNumberofThreads; - uint32_t StatisticsEnable; - uint32_t ComputeWCoordinateEnable; - uint32_t DSCacheDisable; - uint32_t DSFunctionEnable; + bool StatisticsEnable; + bool ComputeWCoordinateEnable; + bool DSCacheDisable; + bool DSFunctionEnable; }; static inline void @@ -2099,7 +2099,7 @@ struct GEN75_3DSTATE_GATHER_CONSTANT_PS { uint32_t ConstantBufferValid; uint32_t ConstantBufferBindingTableBlock; uint32_t GatherBufferOffset; - uint32_t ConstantBufferDx9Enable; + bool ConstantBufferDx9Enable; /* variable length fields follow */ }; @@ -2146,7 +2146,7 @@ struct GEN75_3DSTATE_GATHER_CONSTANT_VS { uint32_t ConstantBufferValid; uint32_t ConstantBufferBindingTableBlock; uint32_t GatherBufferOffset; - uint32_t ConstantBufferDx9Enable; + bool ConstantBufferDx9Enable; /* variable length fields follow */ }; @@ -2193,7 +2193,7 @@ struct GEN75_3DSTATE_GATHER_POOL_ALLOC { uint32_t _3DCommandSubOpcode; uint32_t DwordLength; __gen_address_type GatherPoolBaseAddress; - uint32_t GatherPoolEnable; + bool GatherPoolEnable; struct GEN75_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; __gen_address_type GatherPoolUpperBound; }; @@ -2264,16 +2264,16 @@ struct GEN75_3DSTATE_GS { #define IEEE754 0 #define alternate 1 uint32_t FloatingPointMode; - uint32_t IllegalOpcodeExceptionEnable; + bool IllegalOpcodeExceptionEnable; uint32_t GSaccessesUAV; - uint32_t MaskStackExceptionEnable; - uint32_t SoftwareExceptionEnable; + bool MaskStackExceptionEnable; + bool SoftwareExceptionEnable; uint32_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; @@ -2286,13 +2286,13 @@ struct GEN75_3DSTATE_GS { uint32_t DispatchMode; uint32_t GSStatisticsEnable; uint32_t GSInvocationsIncrementValue; - uint32_t IncludePrimitiveID; + bool IncludePrimitiveID; uint32_t Hint; #define REORDER_LEADING 0 #define REORDER_TRAILING 1 uint32_t ReorderMode; - uint32_t DiscardAdjacency; - uint32_t GSEnable; + bool DiscardAdjacency; + bool GSEnable; #define GSCTL_CUT 0 #define GSCTL_SID 1 uint32_t ControlDataFormat; @@ -2443,11 +2443,11 @@ struct GEN75_3DSTATE_HS { #define IEEE754 0 #define alternate 1 uint32_t FloatingPointMode; - uint32_t IllegalOpcodeExceptionEnable; - uint32_t SoftwareExceptionEnable; + bool IllegalOpcodeExceptionEnable; + bool SoftwareExceptionEnable; uint32_t MaximumNumberofThreads; - uint32_t Enable; - uint32_t StatisticsEnable; + bool Enable; + bool StatisticsEnable; uint32_t InstanceCount; uint32_t KernelStartPointer; uint32_t ScratchSpaceBasePointer; @@ -2456,8 +2456,8 @@ struct GEN75_3DSTATE_HS { #define Dmask 0 #define Vmask 1 uint32_t VectorMaskEnable; - uint32_t HSaccessesUAV; - uint32_t IncludeVertexHandles; + bool HSaccessesUAV; + bool IncludeVertexHandles; uint32_t DispatchGRFStartRegisterForURBData; uint32_t VertexURBEntryReadLength; uint32_t VertexURBEntryReadOffset; @@ -2590,7 +2590,7 @@ struct GEN75_3DSTATE_LINE_STIPPLE { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t ModifyEnableCurrentRepeatCounterCurrentStippleIndex; + bool ModifyEnableCurrentRepeatCounterCurrentStippleIndex; uint32_t CurrentRepeatCounter; uint32_t CurrentStippleIndex; uint32_t LineStipplePattern; @@ -2681,7 +2681,7 @@ struct GEN75_3DSTATE_MULTISAMPLE { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t MultiSampleEnable; + bool MultiSampleEnable; #define PIXLOC_CENTER 0 #define PIXLOC_UL_CORNER 1 uint32_t PixelLocation; @@ -2867,27 +2867,27 @@ struct GEN75_3DSTATE_PS { #define RD 2 #define RTZ 3 uint32_t RoundingMode; - uint32_t IllegalOpcodeExceptionEnable; - uint32_t MaskStackExceptionEnable; - uint32_t SoftwareExceptionEnable; + bool IllegalOpcodeExceptionEnable; + bool MaskStackExceptionEnable; + bool SoftwareExceptionEnable; uint32_t ScratchSpaceBasePointer; uint32_t PerThreadScratchSpace; uint32_t MaximumNumberofThreads; uint32_t SampleMask; - uint32_t PushConstantEnable; - uint32_t AttributeEnable; - uint32_t oMaskPresenttoRenderTarget; - uint32_t RenderTargetFastClearEnable; - uint32_t DualSourceBlendEnable; - uint32_t RenderTargetResolveEnable; - uint32_t PSAccessesUAV; + bool PushConstantEnable; + bool AttributeEnable; + bool oMaskPresenttoRenderTarget; + bool RenderTargetFastClearEnable; + bool DualSourceBlendEnable; + bool RenderTargetResolveEnable; + bool PSAccessesUAV; #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; @@ -3616,16 +3616,16 @@ struct GEN75_3DSTATE_SBE { uint32_t DwordLength; uint32_t AttributeSwizzleControlMode; uint32_t NumberofSFOutputAttributes; - uint32_t AttributeSwizzleEnable; + bool AttributeSwizzleEnable; #define UPPERLEFT 0 #define LOWERLEFT 1 uint32_t PointSpriteTextureCoordinateOrigin; uint32_t VertexURBEntryReadLength; uint32_t VertexURBEntryReadOffset; - uint32_t Attribute2n1ComponentOverrideW; - uint32_t Attribute2n1ComponentOverrideZ; - uint32_t Attribute2n1ComponentOverrideY; - uint32_t Attribute2n1ComponentOverrideX; + bool Attribute2n1ComponentOverrideW; + bool Attribute2n1ComponentOverrideZ; + bool Attribute2n1ComponentOverrideY; + bool Attribute2n1ComponentOverrideX; #define CONST_0000 0 #define CONST_0001_FLOAT 1 #define CONST_1111_FLOAT 2 @@ -3637,10 +3637,10 @@ struct GEN75_3DSTATE_SBE { #define INPUTATTR_FACING_W 3 uint32_t Attribute2n1SwizzleSelect; uint32_t Attribute2n1SourceAttribute; - uint32_t Attribute2nComponentOverrideW; - uint32_t Attribute2nComponentOverrideZ; - uint32_t Attribute2nComponentOverrideY; - uint32_t Attribute2nComponentOverrideX; + bool Attribute2nComponentOverrideW; + bool Attribute2nComponentOverrideZ; + bool Attribute2nComponentOverrideY; + bool Attribute2nComponentOverrideX; #define CONST_0000 0 #define CONST_0001_FLOAT 1 #define CONST_1111_FLOAT 2 @@ -3803,11 +3803,11 @@ struct GEN75_3DSTATE_SF { #define D24_UNORM_X8_UINT 3 #define D16_UNORM 5 uint32_t DepthBufferSurfaceFormat; - uint32_t LegacyGlobalDepthBiasEnable; - uint32_t StatisticsEnable; - uint32_t GlobalDepthOffsetEnableSolid; - uint32_t GlobalDepthOffsetEnableWireframe; - uint32_t GlobalDepthOffsetEnablePoint; + bool LegacyGlobalDepthBiasEnable; + bool StatisticsEnable; + bool GlobalDepthOffsetEnableSolid; + bool GlobalDepthOffsetEnableWireframe; + bool GlobalDepthOffsetEnablePoint; #define RASTER_SOLID 0 #define RASTER_WIREFRAME 1 #define RASTER_POINT 2 @@ -3816,9 +3816,9 @@ struct GEN75_3DSTATE_SF { #define RASTER_WIREFRAME 1 #define RASTER_POINT 2 uint32_t BackFaceFillMode; - uint32_t ViewTransformEnable; + bool ViewTransformEnable; uint32_t FrontWinding; - uint32_t AntiAliasingEnable; + bool AntiAliasingEnable; #define CULLMODE_BOTH 0 #define CULLMODE_NONE 1 #define CULLMODE_FRONT 2 @@ -3826,11 +3826,11 @@ struct GEN75_3DSTATE_SF { uint32_t CullMode; float LineWidth; uint32_t LineEndCapAntialiasingRegionWidth; - uint32_t LineStippleEnable; - uint32_t ScissorRectangleEnable; - uint32_t RTIndependentRasterizationEnable; + bool LineStippleEnable; + bool ScissorRectangleEnable; + bool RTIndependentRasterizationEnable; uint32_t MultisampleRasterizationMode; - uint32_t LastPixelEnable; + bool LastPixelEnable; #define Vertex0 0 #define Vertex1 1 #define Vertex2 2 @@ -4153,7 +4153,7 @@ struct GEN75_3DSTATE_STREAMOUT { #define LEADING 0 #define TRAILING 1 uint32_t ReorderMode; - uint32_t SOStatisticsEnable; + bool SOStatisticsEnable; uint32_t SOBufferEnable3; uint32_t SOBufferEnable2; uint32_t SOBufferEnable1; @@ -4227,9 +4227,9 @@ struct GEN75_3DSTATE_TE { #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 @@ -4238,7 +4238,7 @@ struct GEN75_3DSTATE_TE { #define HW_TESS 0 #define SW_TESS 1 uint32_t TEMode; - uint32_t TEEnable; + bool TEEnable; float MaximumTessellationFactorOdd; float MaximumTessellationFactorNotOdd; }; @@ -4415,7 +4415,7 @@ struct GEN75_VERTEX_BUFFER_STATE { uint32_t BufferAccessType; struct GEN75_MEMORY_OBJECT_CONTROL_STATE VertexBufferMemoryObjectControlState; uint32_t AddressModifyEnable; - uint32_t NullVertexBuffer; + bool NullVertexBuffer; uint32_t VertexFetchInvalidate; uint32_t BufferPitch; __gen_address_type BufferStartingAddress; @@ -4494,9 +4494,9 @@ GEN75_3DSTATE_VERTEX_BUFFERS_pack(__gen_user_data *data, void * restrict dst, struct GEN75_VERTEX_ELEMENT_STATE { uint32_t VertexBufferIndex; - uint32_t Valid; + bool Valid; uint32_t SourceElementFormat; - uint32_t EdgeFlagEnable; + bool EdgeFlagEnable; uint32_t SourceElementOffset; uint32_t Component0Control; uint32_t Component1Control; @@ -4567,7 +4567,7 @@ struct GEN75_3DSTATE_VF { uint32_t CommandSubType; uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; - uint32_t IndexedDrawCutIndexEnable; + bool IndexedDrawCutIndexEnable; uint32_t DwordLength; uint32_t CutIndex; }; @@ -4606,7 +4606,7 @@ struct GEN75_3DSTATE_VF_STATISTICS { uint32_t CommandSubType; uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; - uint32_t StatisticsEnable; + bool StatisticsEnable; }; static inline void @@ -4736,18 +4736,18 @@ struct GEN75_3DSTATE_VS { #define IEEE754 0 #define Alternate 1 uint32_t FloatingPointMode; - uint32_t IllegalOpcodeExceptionEnable; - uint32_t VSaccessesUAV; - uint32_t SoftwareExceptionEnable; + bool IllegalOpcodeExceptionEnable; + bool VSaccessesUAV; + bool SoftwareExceptionEnable; uint32_t ScratchSpaceBaseOffset; uint32_t PerThreadScratchSpace; uint32_t DispatchGRFStartRegisterforURBData; uint32_t VertexURBEntryReadLength; uint32_t VertexURBEntryReadOffset; uint32_t MaximumNumberofThreads; - uint32_t StatisticsEnable; - uint32_t VertexCacheDisable; - uint32_t VSFunctionEnable; + bool StatisticsEnable; + bool VertexCacheDisable; + bool VSFunctionEnable; }; static inline void @@ -4815,13 +4815,13 @@ struct GEN75_3DSTATE_WM { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t StatisticsEnable; - uint32_t DepthBufferClear; - uint32_t ThreadDispatchEnable; - uint32_t DepthBufferResolveEnable; - uint32_t HierarchicalDepthBufferResolveEnable; - uint32_t LegacyDiamondLineRasterization; - uint32_t PixelShaderKillPixel; + bool StatisticsEnable; + bool DepthBufferClear; + bool ThreadDispatchEnable; + bool DepthBufferResolveEnable; + bool HierarchicalDepthBufferResolveEnable; + bool LegacyDiamondLineRasterization; + bool PixelShaderKillPixel; #define PSCDEPTH_OFF 0 #define PSCDEPTH_ON 1 #define PSCDEPTH_ON_GE 2 @@ -4831,19 +4831,19 @@ struct GEN75_3DSTATE_WM { #define EDSC_PSEXEC 1 #define EDSC_PREPS 2 uint32_t EarlyDepthStencilControl; - uint32_t PixelShaderUsesSourceDepth; - uint32_t PixelShaderUsesSourceW; + bool PixelShaderUsesSourceDepth; + bool PixelShaderUsesSourceW; #define INTERP_PIXEL 0 #define INTERP_CENTROID 2 #define INTERP_SAMPLE 3 uint32_t PositionZWInterpolationMode; uint32_t BarycentricInterpolationMode; - uint32_t PixelShaderUsesInputCoverageMask; + bool PixelShaderUsesInputCoverageMask; uint32_t LineEndCapAntialiasingRegionWidth; uint32_t LineAntialiasingRegionWidth; - uint32_t RTIndependentRasterizationEnable; - uint32_t PolygonStippleEnable; - uint32_t LineStippleEnable; + bool RTIndependentRasterizationEnable; + bool PolygonStippleEnable; + bool LineStippleEnable; #define RASTRULE_UPPER_LEFT 0 #define RASTRULE_UPPER_RIGHT 1 uint32_t PointRasterizationRule; @@ -4919,7 +4919,7 @@ struct GEN75_GPGPU_OBJECT { uint32_t Pipeline; uint32_t MediaCommandOpcode; uint32_t SubOpcode; - uint32_t PredicateEnable; + bool PredicateEnable; uint32_t DwordLength; uint32_t SharedLocalMemoryFixedOffset; uint32_t InterfaceDescriptorOffset; @@ -5004,8 +5004,8 @@ struct GEN75_GPGPU_WALKER { uint32_t Pipeline; uint32_t MediaCommandOpcode; uint32_t SubOpcodeA; - uint32_t IndirectParameterEnable; - uint32_t PredicateEnable; + bool IndirectParameterEnable; + bool PredicateEnable; uint32_t DwordLength; uint32_t InterfaceDescriptorOffset; #define SIMD8 0 @@ -5192,7 +5192,7 @@ struct GEN75_MEDIA_OBJECT { uint32_t MediaCommandSubOpcode; uint32_t DwordLength; uint32_t InterfaceDescriptorOffset; - uint32_t ChildrenPresent; + bool ChildrenPresent; #define Nothreadsynchronization 0 #define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 uint32_t ThreadSynchronization; @@ -5212,7 +5212,7 @@ struct GEN75_MEDIA_OBJECT { uint32_t ScoredboardY; uint32_t ScoreboardX; uint32_t ScoreboardColor; - uint32_t ScoreboardMask; + bool ScoreboardMask; /* variable length fields follow */ }; @@ -5278,8 +5278,8 @@ struct GEN75_MEDIA_OBJECT_PRT { 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; @@ -5333,7 +5333,7 @@ struct GEN75_MEDIA_OBJECT_WALKER { uint32_t SubOpcode; uint32_t DwordLength; uint32_t InterfaceDescriptorOffset; - uint32_t ChildrenPresent; + bool ChildrenPresent; #define Nothreadsynchronization 0 #define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 uint32_t ThreadSynchronization; @@ -5342,10 +5342,10 @@ struct GEN75_MEDIA_OBJECT_WALKER { uint32_t UseScoreboard; uint32_t IndirectDataLength; uint32_t IndirectDataStartAddress; - uint32_t ScoreboardMask; - uint32_t DualMode; - uint32_t Repel; - uint32_t QuadMode; + bool ScoreboardMask; + bool DualMode; + bool Repel; + bool QuadMode; uint32_t ColorCountMinusOne; uint32_t MiddleLoopExtraSteps; uint32_t LocalMidLoopUnitY; @@ -5483,8 +5483,8 @@ struct GEN75_MEDIA_STATE_FLUSH { uint32_t MediaCommandOpcode; uint32_t SubOpcode; uint32_t DwordLength; - uint32_t DisablePreemption; - uint32_t FlushtoGO; + bool DisablePreemption; + bool FlushtoGO; uint32_t WatermarkRequired; uint32_t InterfaceDescriptorOffset; }; @@ -5667,7 +5667,7 @@ GEN75_MI_ARB_CHECK_pack(__gen_user_data *data, void * restrict dst, struct GEN75_MI_ARB_ON_OFF { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t ArbitrationEnable; + bool ArbitrationEnable; }; static inline void @@ -5721,11 +5721,11 @@ struct GEN75_MI_BATCH_BUFFER_START { #define _1stlevelbatch 0 #define _2ndlevelbatch 1 uint32_t _2ndLevelBatchBuffer; - uint32_t AddOffsetEnable; - uint32_t PredicationEnable; + bool AddOffsetEnable; + bool PredicationEnable; uint32_t NonPrivileged; - uint32_t ClearCommandBufferEnable; - uint32_t ResourceStreamerEnable; + bool ClearCommandBufferEnable; + bool ResourceStreamerEnable; #define ASI_GGTT 0 #define ASI_PPGTT 1 uint32_t AddressSpaceIndicator; @@ -5861,17 +5861,17 @@ GEN75_MI_CONDITIONAL_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restric struct GEN75_MI_FLUSH { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t IndirectStatePointersDisable; - uint32_t GenericMediaStateClear; + bool IndirectStatePointersDisable; + bool GenericMediaStateClear; #define DontReset 0 #define Reset 1 - uint32_t GlobalSnapshotCountReset; + bool GlobalSnapshotCountReset; #define Flush 0 #define DontFlush 1 - uint32_t RenderCacheFlushInhibit; + bool RenderCacheFlushInhibit; #define DontInvalidate 0 #define Invalidate 1 - uint32_t StateInstructionCacheInvalidate; + bool StateInstructionCacheInvalidate; }; static inline void @@ -5941,7 +5941,7 @@ GEN75_MI_LOAD_REGISTER_IMM_pack(__gen_user_data *data, void * restrict dst, struct GEN75_MI_LOAD_REGISTER_MEM { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t UseGlobalGTT; + bool UseGlobalGTT; uint32_t AsyncModeEnable; uint32_t DwordLength; uint32_t RegisterAddress; @@ -6174,7 +6174,7 @@ GEN75_MI_MATH_pack(__gen_user_data *data, void * restrict dst, struct GEN75_MI_NOOP { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t IdentificationNumberRegisterWriteEnable; + bool IdentificationNumberRegisterWriteEnable; uint32_t IdentificationNumber; }; @@ -6202,9 +6202,9 @@ GEN75_MI_NOOP_pack(__gen_user_data *data, void * restrict dst, struct GEN75_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 @@ -6265,8 +6265,8 @@ GEN75_MI_REPORT_HEAD_pack(__gen_user_data *data, void * restrict dst, struct GEN75_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; }; @@ -6293,8 +6293,8 @@ GEN75_MI_RS_CONTEXT_pack(__gen_user_data *data, void * restrict dst, struct GEN75_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; }; @@ -6412,9 +6412,9 @@ struct GEN75_MI_SET_CONTEXT { 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; }; @@ -6459,7 +6459,7 @@ struct GEN75_MI_SET_PREDICATE { #define PredicateonClear 1 #define PredicateonSet 2 #define PredicateDisable 3 - uint32_t PREDICATEENABLE; + bool PREDICATEENABLE; }; static inline void @@ -6486,7 +6486,7 @@ GEN75_MI_SET_PREDICATE_pack(__gen_user_data *data, void * restrict dst, struct GEN75_MI_STORE_DATA_IMM { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t UseGlobalGTT; + bool UseGlobalGTT; uint32_t DwordLength; uint32_t Address; uint32_t CoreModeEnable; @@ -6615,7 +6615,7 @@ GEN75_MI_STORE_URB_MEM_pack(__gen_user_data *data, void * restrict dst, struct GEN75_MI_SUSPEND_FLUSH { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t SuspendFlush; + bool SuspendFlush; }; static inline void @@ -6791,23 +6791,23 @@ GEN75_MI_USER_INTERRUPT_pack(__gen_user_data *data, void * restrict dst, struct GEN75_MI_WAIT_FOR_EVENT { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t DisplayPipeCHorizontalBlankWaitEnable; - uint32_t DisplayPipeCVerticalBlankWaitEnable; - uint32_t DisplaySpriteCFlipPendingWaitEnable; + bool DisplayPipeCHorizontalBlankWaitEnable; + bool DisplayPipeCVerticalBlankWaitEnable; + bool DisplaySpriteCFlipPendingWaitEnable; #define Notenabled 0 uint32_t ConditionCodeWaitSelect; - uint32_t DisplayPlaneCFlipPendingWaitEnable; - uint32_t DisplayPipeCScanLineWaitEnable; - uint32_t DisplayPipeBHorizontalBlankWaitEnable; - uint32_t DisplayPipeBVerticalBlankWaitEnable; - uint32_t DisplaySpriteBFlipPendingWaitEnable; - uint32_t DisplayPlaneBFlipPendingWaitEnable; - uint32_t DisplayPipeBScanLineWaitEnable; - uint32_t DisplayPipeAHorizontalBlankWaitEnable; - uint32_t DisplayPipeAVerticalBlankWaitEnable; - uint32_t DisplaySpriteAFlipPendingWaitEnable; - uint32_t DisplayPlaneAFlipPendingWaitEnable; - uint32_t DisplayPipeAScanLineWaitEnable; + bool DisplayPlaneCFlipPendingWaitEnable; + bool DisplayPipeCScanLineWaitEnable; + bool DisplayPipeBHorizontalBlankWaitEnable; + bool DisplayPipeBVerticalBlankWaitEnable; + bool DisplaySpriteBFlipPendingWaitEnable; + bool DisplayPlaneBFlipPendingWaitEnable; + bool DisplayPipeBScanLineWaitEnable; + bool DisplayPipeAHorizontalBlankWaitEnable; + bool DisplayPipeAVerticalBlankWaitEnable; + bool DisplaySpriteAFlipPendingWaitEnable; + bool DisplayPlaneAFlipPendingWaitEnable; + bool DisplayPipeAScanLineWaitEnable; }; static inline void @@ -6866,29 +6866,29 @@ struct GEN75_PIPE_CONTROL { #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; uint32_t ImmediateData; uint32_t ImmediateData0; @@ -7064,8 +7064,8 @@ GEN75_SF_CLIP_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, #define GEN75_BLEND_STATE_length 0x00000002 struct GEN75_BLEND_STATE { - uint32_t ColorBufferBlendEnable; - uint32_t IndependentAlphaBlendEnable; + bool ColorBufferBlendEnable; + bool IndependentAlphaBlendEnable; #define BLENDFUNCTION_ADD 0 #define BLENDFUNCTION_SUBTRACT 1 #define BLENDFUNCTION_REVERSE_SUBTRACT 2 @@ -7101,14 +7101,14 @@ struct GEN75_BLEND_STATE { uint32_t ColorBlendFunction; uint32_t SourceBlendFactor; uint32_t DestinationBlendFactor; - uint32_t AlphaToCoverageEnable; - uint32_t AlphaToOneEnable; - uint32_t AlphaToCoverageDitherEnable; - uint32_t WriteDisableAlpha; - uint32_t WriteDisableRed; - uint32_t WriteDisableGreen; - uint32_t WriteDisableBlue; - uint32_t LogicOpEnable; + bool AlphaToCoverageEnable; + bool AlphaToOneEnable; + bool AlphaToCoverageDitherEnable; + bool WriteDisableAlpha; + bool WriteDisableRed; + bool WriteDisableGreen; + bool WriteDisableBlue; + bool LogicOpEnable; #define LOGICOP_CLEAR 0 #define LOGICOP_NOR 1 #define LOGICOP_AND_INVERTED 2 @@ -7126,7 +7126,7 @@ struct GEN75_BLEND_STATE { #define LOGICOP_OR 14 #define LOGICOP_SET 15 uint32_t LogicOpFunction; - uint32_t AlphaTestEnable; + bool AlphaTestEnable; #define COMPAREFUNCTION_ALWAYS 0 #define COMPAREFUNCTION_NEVER 1 #define COMPAREFUNCTION_LESS 2 @@ -7136,15 +7136,15 @@ struct GEN75_BLEND_STATE { #define COMPAREFUNCTION_NOTEQUAL 6 #define COMPAREFUNCTION_GEQUAL 7 uint32_t AlphaTestFunction; - uint32_t ColorDitherEnable; + bool ColorDitherEnable; uint32_t XDitherOffset; uint32_t YDitherOffset; #define COLORCLAMP_UNORM 0 #define COLORCLAMP_SNORM 1 #define COLORCLAMP_RTFORMAT 2 uint32_t ColorClampRange; - uint32_t PreBlendColorClampEnable; - uint32_t PostBlendColorClampEnable; + bool PreBlendColorClampEnable; + bool PostBlendColorClampEnable; }; static inline void @@ -7267,7 +7267,7 @@ GEN75_COLOR_CALC_STATE_pack(__gen_user_data *data, void * restrict dst, #define GEN75_DEPTH_STENCIL_STATE_length 0x00000003 struct GEN75_DEPTH_STENCIL_STATE { - uint32_t StencilTestEnable; + bool StencilTestEnable; #define COMPAREFUNCTION_ALWAYS 0 #define COMPAREFUNCTION_NEVER 1 #define COMPAREFUNCTION_LESS 2 @@ -7288,8 +7288,8 @@ struct GEN75_DEPTH_STENCIL_STATE { uint32_t StencilFailOp; uint32_t StencilPassDepthFailOp; uint32_t StencilPassDepthPassOp; - uint32_t StencilBufferWriteEnable; - uint32_t DoubleSidedStencilEnable; + bool StencilBufferWriteEnable; + bool DoubleSidedStencilEnable; #define COMPAREFUNCTION_ALWAYS 0 #define COMPAREFUNCTION_NEVER 1 #define COMPAREFUNCTION_LESS 2 @@ -7314,7 +7314,7 @@ struct GEN75_DEPTH_STENCIL_STATE { uint32_t StencilWriteMask; uint32_t BackfaceStencilTestMask; uint32_t BackfaceStencilWriteMask; - uint32_t DepthTestEnable; + bool DepthTestEnable; #define COMPAREFUNCTION_ALWAYS 0 #define COMPAREFUNCTION_NEVER 1 #define COMPAREFUNCTION_LESS 2 @@ -7324,7 +7324,7 @@ struct GEN75_DEPTH_STENCIL_STATE { #define COMPAREFUNCTION_NOTEQUAL 6 #define COMPAREFUNCTION_GEQUAL 7 uint32_t DepthTestFunction; - uint32_t DepthBufferWriteEnable; + bool DepthBufferWriteEnable; }; static inline void @@ -7407,9 +7407,9 @@ struct GEN75_INTERFACE_DESCRIPTOR_DATA { #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 @@ -7425,7 +7425,7 @@ struct GEN75_INTERFACE_DESCRIPTOR_DATA { #define RD 2 #define RTZ 3 uint32_t RoundingMode; - uint32_t BarrierEnable; + bool BarrierEnable; uint32_t SharedLocalMemorySize; uint32_t NumberofThreadsinGPGPUThreadGroup; uint32_t CrossThreadConstantDataReadLength; @@ -7511,7 +7511,7 @@ struct GEN75_RENDER_SURFACE_STATE { #define SURFTYPE_STRBUF 5 #define SURFTYPE_NULL 7 uint32_t SurfaceType; - uint32_t SurfaceArray; + bool SurfaceArray; uint32_t SurfaceFormat; uint32_t SurfaceVerticalAlignment; #define HALIGN_4 0 @@ -7561,8 +7561,8 @@ struct GEN75_RENDER_SURFACE_STATE { __gen_address_type MCSBaseAddress; uint32_t MCSSurfacePitch; __gen_address_type AppendCounterAddress; - uint32_t AppendCounterEnable; - uint32_t MCSEnable; + bool AppendCounterEnable; + bool MCSEnable; uint32_t ReservedMBZ; uint32_t XOffsetforUVPlane; uint32_t YOffsetforUVPlane; @@ -7716,7 +7716,7 @@ GEN75_SAMPLER_BORDER_COLOR_STATE_pack(__gen_user_data *data, void * restrict dst #define GEN75_SAMPLER_STATE_length 0x00000004 struct GEN75_SAMPLER_STATE { - uint32_t SamplerDisable; + bool SamplerDisable; #define DX10OGL 0 #define DX9 1 uint32_t TextureBorderColorMode; @@ -7756,7 +7756,7 @@ struct GEN75_SAMPLER_STATE { #define OVERRIDE 1 uint32_t CubeSurfaceControlMode; uint32_t BorderColorPointer; - uint32_t ChromaKeyEnable; + bool ChromaKeyEnable; uint32_t ChromaKeyIndex; #define KEYFILTER_KILL_ON_ANY_MATCH 0 #define KEYFILTER_REPLACE_BLACK 1 @@ -7770,18 +7770,18 @@ struct GEN75_SAMPLER_STATE { #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 TRIQUAL_HIGHMAG_CLAMP_MIPFILTER 1 #define MED 2 #define LOW 3 uint32_t TrilinearFilterQuality; - uint32_t NonnormalizedCoordinateEnable; + bool NonnormalizedCoordinateEnable; uint32_t TCXAddressControlMode; uint32_t TCYAddressControlMode; uint32_t TCZAddressControlMode; @@ -7846,7 +7846,7 @@ GEN75_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, #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 diff --git a/src/vulkan/gen7_pack.h b/src/vulkan/gen7_pack.h index db3ddb22d2e..f9121b78868 100644 --- a/src/vulkan/gen7_pack.h +++ b/src/vulkan/gen7_pack.h @@ -144,7 +144,7 @@ GEN7_3DSTATE_URB_VS_pack(__gen_user_data *data, void * restrict dst, struct GEN7_MI_STORE_REGISTER_MEM { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t UseGlobalGTT; + bool UseGlobalGTT; uint32_t DwordLength; uint32_t RegisterAddress; __gen_address_type MemoryAddress; @@ -249,27 +249,27 @@ struct GEN7_STATE_BASE_ADDRESS { struct GEN7_MEMORY_OBJECT_CONTROL_STATE GeneralStateMemoryObjectControlState; struct GEN7_MEMORY_OBJECT_CONTROL_STATE StatelessDataPortAccessMemoryObjectControlState; uint32_t StatelessDataPortAccessForceWriteThru; - uint32_t GeneralStateBaseAddressModifyEnable; + bool GeneralStateBaseAddressModifyEnable; __gen_address_type SurfaceStateBaseAddress; struct GEN7_MEMORY_OBJECT_CONTROL_STATE SurfaceStateMemoryObjectControlState; - uint32_t SurfaceStateBaseAddressModifyEnable; + bool SurfaceStateBaseAddressModifyEnable; __gen_address_type DynamicStateBaseAddress; struct GEN7_MEMORY_OBJECT_CONTROL_STATE DynamicStateMemoryObjectControlState; - uint32_t DynamicStateBaseAddressModifyEnable; + bool DynamicStateBaseAddressModifyEnable; __gen_address_type IndirectObjectBaseAddress; struct GEN7_MEMORY_OBJECT_CONTROL_STATE IndirectObjectMemoryObjectControlState; - uint32_t IndirectObjectBaseAddressModifyEnable; + bool IndirectObjectBaseAddressModifyEnable; __gen_address_type InstructionBaseAddress; struct GEN7_MEMORY_OBJECT_CONTROL_STATE InstructionMemoryObjectControlState; - uint32_t InstructionBaseAddressModifyEnable; + bool InstructionBaseAddressModifyEnable; __gen_address_type GeneralStateAccessUpperBound; - uint32_t GeneralStateAccessUpperBoundModifyEnable; + bool GeneralStateAccessUpperBoundModifyEnable; __gen_address_type DynamicStateAccessUpperBound; - uint32_t DynamicStateAccessUpperBoundModifyEnable; + bool DynamicStateAccessUpperBoundModifyEnable; __gen_address_type IndirectObjectAccessUpperBound; - uint32_t IndirectObjectAccessUpperBoundModifyEnable; + bool IndirectObjectAccessUpperBoundModifyEnable; __gen_address_type InstructionAccessUpperBound; - uint32_t InstructionAccessUpperBoundModifyEnable; + bool InstructionAccessUpperBoundModifyEnable; }; static inline void @@ -508,10 +508,10 @@ struct GEN7_3DPRIMITIVE { uint32_t CommandSubType; uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; - uint32_t IndirectParameterEnable; - uint32_t PredicateEnable; + bool IndirectParameterEnable; + bool PredicateEnable; uint32_t DwordLength; - uint32_t EndOffsetEnable; + bool EndOffsetEnable; #define SEQUENTIAL 0 #define RANDOM 1 uint32_t VertexAccessType; @@ -946,7 +946,7 @@ struct GEN7_3DSTATE_CLEAR_PARAMS { uint32_t _3DCommandSubOpcode; uint32_t DwordLength; uint32_t DepthClearValue; - uint32_t DepthClearValueValid; + bool DepthClearValueValid; }; static inline void @@ -990,27 +990,27 @@ struct GEN7_3DSTATE_CLIP { uint32_t DwordLength; uint32_t FrontWinding; uint32_t VertexSubPixelPrecisionSelect; - uint32_t EarlyCullEnable; + bool EarlyCullEnable; #define CULLMODE_BOTH 0 #define CULLMODE_NONE 1 #define CULLMODE_FRONT 2 #define CULLMODE_BACK 3 uint32_t CullMode; - uint32_t ClipperStatisticsEnable; + bool ClipperStatisticsEnable; uint32_t UserClipDistanceCullTestEnableBitmask; - uint32_t ClipEnable; + bool ClipEnable; #define APIMODE_OGL 0 uint32_t APIMode; - uint32_t ViewportXYClipTestEnable; - uint32_t ViewportZClipTestEnable; - uint32_t GuardbandClipTestEnable; + bool ViewportXYClipTestEnable; + bool ViewportZClipTestEnable; + bool GuardbandClipTestEnable; uint32_t UserClipDistanceClipTestEnableBitmask; #define CLIPMODE_NORMAL 0 #define CLIPMODE_REJECT_ALL 3 #define CLIPMODE_ACCEPT_ALL 4 uint32_t ClipMode; - uint32_t PerspectiveDivideDisable; - uint32_t NonPerspectiveBarycentricEnable; + bool PerspectiveDivideDisable; + bool NonPerspectiveBarycentricEnable; #define Vertex0 0 #define Vertex1 1 #define Vertex2 2 @@ -1024,7 +1024,7 @@ struct GEN7_3DSTATE_CLIP { uint32_t TriangleFanProvokingVertexSelect; float MinimumPointWidth; float MaximumPointWidth; - uint32_t ForceZeroRTAIndexEnable; + bool ForceZeroRTAIndexEnable; uint32_t MaximumVPIndex; }; @@ -1328,9 +1328,9 @@ struct GEN7_3DSTATE_DEPTH_BUFFER { #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 @@ -1528,18 +1528,18 @@ struct GEN7_3DSTATE_DS { #define IEEE754 0 #define Alternate 1 uint32_t FloatingPointMode; - uint32_t IllegalOpcodeExceptionEnable; - uint32_t SoftwareExceptionEnable; + bool IllegalOpcodeExceptionEnable; + bool SoftwareExceptionEnable; uint32_t ScratchSpaceBasePointer; uint32_t PerThreadScratchSpace; uint32_t DispatchGRFStartRegisterForURBData; uint32_t PatchURBEntryReadLength; uint32_t PatchURBEntryReadOffset; uint32_t MaximumNumberofThreads; - uint32_t StatisticsEnable; - uint32_t ComputeWCoordinateEnable; - uint32_t DSCacheDisable; - uint32_t DSFunctionEnable; + bool StatisticsEnable; + bool ComputeWCoordinateEnable; + bool DSCacheDisable; + bool DSFunctionEnable; }; static inline void @@ -1624,15 +1624,15 @@ struct GEN7_3DSTATE_GS { #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 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; @@ -1648,11 +1648,11 @@ struct GEN7_3DSTATE_GS { uint32_t DispatchMode; uint32_t GSStatisticsEnable; uint32_t GSInvocationsIncrementValue; - uint32_t IncludePrimitiveID; + bool IncludePrimitiveID; uint32_t Hint; - uint32_t ReorderEnable; - uint32_t DiscardAdjacency; - uint32_t GSEnable; + bool ReorderEnable; + bool DiscardAdjacency; + bool GSEnable; uint32_t SemaphoreHandle; }; @@ -1796,11 +1796,11 @@ struct GEN7_3DSTATE_HS { #define IEEE754 0 #define alternate 1 uint32_t FloatingPointMode; - uint32_t IllegalOpcodeExceptionEnable; - uint32_t SoftwareExceptionEnable; + bool IllegalOpcodeExceptionEnable; + bool SoftwareExceptionEnable; uint32_t MaximumNumberofThreads; - uint32_t Enable; - uint32_t StatisticsEnable; + bool Enable; + bool StatisticsEnable; uint32_t InstanceCount; uint32_t KernelStartPointer; uint32_t ScratchSpaceBasePointer; @@ -1809,7 +1809,7 @@ struct GEN7_3DSTATE_HS { #define Dmask 0 #define Vmask 1 uint32_t VectorMaskEnable; - uint32_t IncludeVertexHandles; + bool IncludeVertexHandles; uint32_t DispatchGRFStartRegisterForURBData; uint32_t VertexURBEntryReadLength; uint32_t VertexURBEntryReadOffset; @@ -1884,7 +1884,7 @@ struct GEN7_3DSTATE_INDEX_BUFFER { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; struct GEN7_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - uint32_t CutIndexEnable; + bool CutIndexEnable; #define INDEX_BYTE 0 #define INDEX_WORD 1 #define INDEX_DWORD 2 @@ -1942,7 +1942,7 @@ struct GEN7_3DSTATE_LINE_STIPPLE { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t ModifyEnableCurrentRepeatCounterCurrentStippleIndex; + bool ModifyEnableCurrentRepeatCounterCurrentStippleIndex; uint32_t CurrentRepeatCounter; uint32_t CurrentStippleIndex; uint32_t LineStipplePattern; @@ -2214,25 +2214,25 @@ struct GEN7_3DSTATE_PS { #define RD 2 #define RTZ 3 uint32_t RoundingMode; - uint32_t IllegalOpcodeExceptionEnable; - uint32_t MaskStackExceptionEnable; - uint32_t SoftwareExceptionEnable; + bool IllegalOpcodeExceptionEnable; + bool MaskStackExceptionEnable; + bool SoftwareExceptionEnable; uint32_t ScratchSpaceBasePointer; uint32_t PerThreadScratchSpace; uint32_t MaximumNumberofThreads; - uint32_t PushConstantEnable; - uint32_t AttributeEnable; - uint32_t oMaskPresenttoRenderTarget; - uint32_t RenderTargetFastClearEnable; - uint32_t DualSourceBlendEnable; - uint32_t RenderTargetResolveEnable; + bool PushConstantEnable; + bool AttributeEnable; + bool oMaskPresenttoRenderTarget; + bool RenderTargetFastClearEnable; + bool DualSourceBlendEnable; + 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; @@ -2851,16 +2851,16 @@ struct GEN7_3DSTATE_SBE { #define SWIZ_16_31 1 uint32_t AttributeSwizzleControlMode; uint32_t NumberofSFOutputAttributes; - uint32_t AttributeSwizzleEnable; + bool AttributeSwizzleEnable; #define UPPERLEFT 0 #define LOWERLEFT 1 uint32_t PointSpriteTextureCoordinateOrigin; uint32_t VertexURBEntryReadLength; uint32_t VertexURBEntryReadOffset; - uint32_t Attribute2n1ComponentOverrideW; - uint32_t Attribute2n1ComponentOverrideZ; - uint32_t Attribute2n1ComponentOverrideY; - uint32_t Attribute2n1ComponentOverrideX; + bool Attribute2n1ComponentOverrideW; + bool Attribute2n1ComponentOverrideZ; + bool Attribute2n1ComponentOverrideY; + bool Attribute2n1ComponentOverrideX; #define CONST_0000 0 #define CONST_0001_FLOAT 1 #define CONST_1111_FLOAT 2 @@ -2872,10 +2872,10 @@ struct GEN7_3DSTATE_SBE { #define INPUTATTR_FACING_W 3 uint32_t Attribute2n1SwizzleSelect; uint32_t Attribute2n1SourceAttribute; - uint32_t Attribute2nComponentOverrideW; - uint32_t Attribute2nComponentOverrideZ; - uint32_t Attribute2nComponentOverrideY; - uint32_t Attribute2nComponentOverrideX; + bool Attribute2nComponentOverrideW; + bool Attribute2nComponentOverrideZ; + bool Attribute2nComponentOverrideY; + bool Attribute2nComponentOverrideX; #define CONST_0000 0 #define CONST_0001_FLOAT 1 #define CONST_1111_FLOAT 2 @@ -3038,11 +3038,11 @@ struct GEN7_3DSTATE_SF { #define D24_UNORM_X8_UINT 3 #define D16_UNORM 5 uint32_t DepthBufferSurfaceFormat; - uint32_t LegacyGlobalDepthBiasEnable; - uint32_t StatisticsEnable; - uint32_t GlobalDepthOffsetEnableSolid; - uint32_t GlobalDepthOffsetEnableWireframe; - uint32_t GlobalDepthOffsetEnablePoint; + bool LegacyGlobalDepthBiasEnable; + bool StatisticsEnable; + bool GlobalDepthOffsetEnableSolid; + bool GlobalDepthOffsetEnableWireframe; + bool GlobalDepthOffsetEnablePoint; #define RASTER_SOLID 0 #define RASTER_WIREFRAME 1 #define RASTER_POINT 2 @@ -3051,9 +3051,9 @@ struct GEN7_3DSTATE_SF { #define RASTER_WIREFRAME 1 #define RASTER_POINT 2 uint32_t BackFaceFillMode; - uint32_t ViewTransformEnable; + bool ViewTransformEnable; uint32_t FrontWinding; - uint32_t AntiAliasingEnable; + bool AntiAliasingEnable; #define CULLMODE_BOTH 0 #define CULLMODE_NONE 1 #define CULLMODE_FRONT 2 @@ -3061,9 +3061,9 @@ struct GEN7_3DSTATE_SF { uint32_t CullMode; float LineWidth; uint32_t LineEndCapAntialiasingRegionWidth; - uint32_t ScissorRectangleEnable; + bool ScissorRectangleEnable; uint32_t MultisampleRasterizationMode; - uint32_t LastPixelEnable; + bool LastPixelEnable; #define Vertex0 0 #define Vertex1 1 #define Vertex2 2 @@ -3382,7 +3382,7 @@ struct GEN7_3DSTATE_STREAMOUT { #define LEADING 0 #define TRAILING 1 uint32_t ReorderMode; - uint32_t SOStatisticsEnable; + bool SOStatisticsEnable; uint32_t SOBufferEnable3; uint32_t SOBufferEnable2; uint32_t SOBufferEnable1; @@ -3456,9 +3456,9 @@ struct GEN7_3DSTATE_TE { #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 @@ -3467,7 +3467,7 @@ struct GEN7_3DSTATE_TE { #define HW_TESS 0 #define SW_TESS 1 uint32_t TEMode; - uint32_t TEEnable; + bool TEEnable; float MaximumTessellationFactorOdd; float MaximumTessellationFactorNotOdd; }; @@ -3644,7 +3644,7 @@ struct GEN7_VERTEX_BUFFER_STATE { uint32_t BufferAccessType; struct GEN7_MEMORY_OBJECT_CONTROL_STATE VertexBufferMemoryObjectControlState; uint32_t AddressModifyEnable; - uint32_t NullVertexBuffer; + bool NullVertexBuffer; uint32_t VertexFetchInvalidate; uint32_t BufferPitch; __gen_address_type BufferStartingAddress; @@ -3723,9 +3723,9 @@ GEN7_3DSTATE_VERTEX_BUFFERS_pack(__gen_user_data *data, void * restrict dst, struct GEN7_VERTEX_ELEMENT_STATE { uint32_t VertexBufferIndex; - uint32_t Valid; + bool Valid; uint32_t SourceElementFormat; - uint32_t EdgeFlagEnable; + bool EdgeFlagEnable; uint32_t SourceElementOffset; uint32_t Component0Control; uint32_t Component1Control; @@ -3795,7 +3795,7 @@ struct GEN7_3DSTATE_VF_STATISTICS { uint32_t CommandSubType; uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; - uint32_t StatisticsEnable; + bool StatisticsEnable; }; static inline void @@ -3922,17 +3922,17 @@ struct GEN7_3DSTATE_VS { #define IEEE754 0 #define Alternate 1 uint32_t FloatingPointMode; - uint32_t IllegalOpcodeExceptionEnable; - uint32_t SoftwareExceptionEnable; + bool IllegalOpcodeExceptionEnable; + bool SoftwareExceptionEnable; uint32_t ScratchSpaceBaseOffset; uint32_t PerThreadScratchSpace; uint32_t DispatchGRFStartRegisterforURBData; uint32_t VertexURBEntryReadLength; uint32_t VertexURBEntryReadOffset; uint32_t MaximumNumberofThreads; - uint32_t StatisticsEnable; - uint32_t VertexCacheDisable; - uint32_t VSFunctionEnable; + bool StatisticsEnable; + bool VertexCacheDisable; + bool VSFunctionEnable; }; static inline void @@ -3998,13 +3998,13 @@ struct GEN7_3DSTATE_WM { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t StatisticsEnable; - uint32_t DepthBufferClear; - uint32_t ThreadDispatchEnable; - uint32_t DepthBufferResolveEnable; - uint32_t HierarchicalDepthBufferResolveEnable; - uint32_t LegacyDiamondLineRasterization; - uint32_t PixelShaderKillPixel; + bool StatisticsEnable; + bool DepthBufferClear; + bool ThreadDispatchEnable; + bool DepthBufferResolveEnable; + bool HierarchicalDepthBufferResolveEnable; + bool LegacyDiamondLineRasterization; + bool PixelShaderKillPixel; #define PSCDEPTH_OFF 0 #define PSCDEPTH_ON 1 #define PSCDEPTH_ON_GE 2 @@ -4014,18 +4014,18 @@ struct GEN7_3DSTATE_WM { #define EDSC_PSEXEC 1 #define EDSC_PREPS 2 uint32_t EarlyDepthStencilControl; - uint32_t PixelShaderUsesSourceDepth; - uint32_t PixelShaderUsesSourceW; + bool PixelShaderUsesSourceDepth; + bool PixelShaderUsesSourceW; #define INTERP_PIXEL 0 #define INTERP_CENTROID 2 #define INTERP_SAMPLE 3 uint32_t PositionZWInterpolationMode; uint32_t BarycentricInterpolationMode; - uint32_t PixelShaderUsesInputCoverageMask; + bool PixelShaderUsesInputCoverageMask; uint32_t LineEndCapAntialiasingRegionWidth; 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; @@ -4096,7 +4096,7 @@ struct GEN7_GPGPU_OBJECT { uint32_t Pipeline; uint32_t MediaCommandOpcode; uint32_t SubOpcode; - uint32_t PredicateEnable; + bool PredicateEnable; uint32_t DwordLength; uint32_t SharedLocalMemoryFixedOffset; uint32_t InterfaceDescriptorOffset; @@ -4177,8 +4177,8 @@ struct GEN7_GPGPU_WALKER { uint32_t Pipeline; uint32_t MediaCommandOpcode; uint32_t SubOpcodeA; - uint32_t IndirectParameterEnable; - uint32_t PredicateEnable; + bool IndirectParameterEnable; + bool PredicateEnable; uint32_t DwordLength; uint32_t InterfaceDescriptorOffset; #define SIMD8 0 @@ -4365,7 +4365,7 @@ struct GEN7_MEDIA_OBJECT { uint32_t MediaCommandSubOpcode; uint32_t DwordLength; uint32_t InterfaceDescriptorOffset; - uint32_t ChildrenPresent; + bool ChildrenPresent; #define Nothreadsynchronization 0 #define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 uint32_t ThreadSynchronization; @@ -4381,7 +4381,7 @@ struct GEN7_MEDIA_OBJECT { uint32_t ScoredboardY; uint32_t ScoreboardX; uint32_t ScoreboardColor; - uint32_t ScoreboardMask; + bool ScoreboardMask; /* variable length fields follow */ }; @@ -4446,8 +4446,8 @@ struct GEN7_MEDIA_OBJECT_PRT { 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; @@ -4501,7 +4501,7 @@ struct GEN7_MEDIA_OBJECT_WALKER { uint32_t SubOpcode; uint32_t DwordLength; uint32_t InterfaceDescriptorOffset; - uint32_t ChildrenPresent; + bool ChildrenPresent; #define Nothreadsynchronization 0 #define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 uint32_t ThreadSynchronization; @@ -4510,9 +4510,9 @@ struct GEN7_MEDIA_OBJECT_WALKER { uint32_t UseScoreboard; uint32_t IndirectDataLength; uint32_t IndirectDataStartAddress; - uint32_t ScoreboardMask; - uint32_t DualMode; - uint32_t Repel; + bool ScoreboardMask; + bool DualMode; + bool Repel; uint32_t ColorCountMinusOne; uint32_t MiddleLoopExtraSteps; uint32_t LocalMidLoopUnitY; @@ -4833,7 +4833,7 @@ GEN7_MI_ARB_CHECK_pack(__gen_user_data *data, void * restrict dst, struct GEN7_MI_ARB_ON_OFF { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t ArbitrationEnable; + bool ArbitrationEnable; }; static inline void @@ -4884,7 +4884,7 @@ GEN7_MI_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict dst, struct GEN7_MI_BATCH_BUFFER_START { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t ClearCommandBufferEnable; + bool ClearCommandBufferEnable; #define ASI_GGTT 0 #define ASI_PPGTT 1 uint32_t AddressSpaceIndicator; @@ -5015,17 +5015,17 @@ GEN7_MI_CONDITIONAL_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict struct GEN7_MI_FLUSH { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t IndirectStatePointersDisable; - uint32_t GenericMediaStateClear; + bool IndirectStatePointersDisable; + bool GenericMediaStateClear; #define DontReset 0 #define Reset 1 - uint32_t GlobalSnapshotCountReset; + bool GlobalSnapshotCountReset; #define Flush 0 #define DontFlush 1 - uint32_t RenderCacheFlushInhibit; + bool RenderCacheFlushInhibit; #define DontInvalidate 0 #define Invalidate 1 - uint32_t StateInstructionCacheInvalidate; + bool StateInstructionCacheInvalidate; }; static inline void @@ -5095,7 +5095,7 @@ GEN7_MI_LOAD_REGISTER_IMM_pack(__gen_user_data *data, void * restrict dst, struct GEN7_MI_LOAD_REGISTER_MEM { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t UseGlobalGTT; + bool UseGlobalGTT; uint32_t AsyncModeEnable; uint32_t DwordLength; uint32_t RegisterAddress; @@ -5137,7 +5137,7 @@ GEN7_MI_LOAD_REGISTER_MEM_pack(__gen_user_data *data, void * restrict dst, struct GEN7_MI_NOOP { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t IdentificationNumberRegisterWriteEnable; + bool IdentificationNumberRegisterWriteEnable; uint32_t IdentificationNumber; }; @@ -5165,9 +5165,9 @@ GEN7_MI_NOOP_pack(__gen_user_data *data, void * restrict dst, struct GEN7_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 @@ -5272,8 +5272,8 @@ struct GEN7_MI_SET_CONTEXT { uint32_t DwordLength; __gen_address_type LogicalContextAddress; uint32_t ReservedMustbe1; - uint32_t ExtendedStateSaveEnable; - uint32_t ExtendedStateRestoreEnable; + bool ExtendedStateSaveEnable; + bool ExtendedStateRestoreEnable; uint32_t ForceRestore; uint32_t RestoreInhibit; }; @@ -5313,7 +5313,7 @@ GEN7_MI_SET_CONTEXT_pack(__gen_user_data *data, void * restrict dst, struct GEN7_MI_STORE_DATA_IMM { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t UseGlobalGTT; + bool UseGlobalGTT; uint32_t DwordLength; uint32_t Address; uint32_t CoreModeEnable; @@ -5403,7 +5403,7 @@ GEN7_MI_STORE_DATA_INDEX_pack(__gen_user_data *data, void * restrict dst, struct GEN7_MI_SUSPEND_FLUSH { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t SuspendFlush; + bool SuspendFlush; }; static inline void @@ -5551,23 +5551,23 @@ GEN7_MI_USER_INTERRUPT_pack(__gen_user_data *data, void * restrict dst, struct GEN7_MI_WAIT_FOR_EVENT { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t DisplayPipeCHorizontalBlankWaitEnable; - uint32_t DisplayPipeCVerticalBlankWaitEnable; - uint32_t DisplaySpriteCFlipPendingWaitEnable; + bool DisplayPipeCHorizontalBlankWaitEnable; + bool DisplayPipeCVerticalBlankWaitEnable; + bool DisplaySpriteCFlipPendingWaitEnable; #define Notenabled 0 uint32_t ConditionCodeWaitSelect; - uint32_t DisplayPlaneCFlipPendingWaitEnable; - uint32_t DisplayPipeCScanLineWaitEnable; - uint32_t DisplayPipeBHorizontalBlankWaitEnable; - uint32_t DisplayPipeBVerticalBlankWaitEnable; - uint32_t DisplaySpriteBFlipPendingWaitEnable; - uint32_t DisplayPlaneBFlipPendingWaitEnable; - uint32_t DisplayPipeBScanLineWaitEnable; - uint32_t DisplayPipeAHorizontalBlankWaitEnable; - uint32_t DisplayPipeAVerticalBlankWaitEnable; - uint32_t DisplaySpriteAFlipPendingWaitEnable; - uint32_t DisplayPlaneAFlipPendingWaitEnable; - uint32_t DisplayPipeAScanLineWaitEnable; + bool DisplayPlaneCFlipPendingWaitEnable; + bool DisplayPipeCScanLineWaitEnable; + bool DisplayPipeBHorizontalBlankWaitEnable; + bool DisplayPipeBVerticalBlankWaitEnable; + bool DisplaySpriteBFlipPendingWaitEnable; + bool DisplayPlaneBFlipPendingWaitEnable; + bool DisplayPipeBScanLineWaitEnable; + bool DisplayPipeAHorizontalBlankWaitEnable; + bool DisplayPipeAVerticalBlankWaitEnable; + bool DisplaySpriteAFlipPendingWaitEnable; + bool DisplayPlaneAFlipPendingWaitEnable; + bool DisplayPipeAScanLineWaitEnable; }; static inline void @@ -5626,29 +5626,29 @@ struct GEN7_PIPE_CONTROL { #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; uint32_t ImmediateData; uint32_t ImmediateData0; @@ -5820,8 +5820,8 @@ GEN7_SF_CLIP_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, #define GEN7_BLEND_STATE_length 0x00000002 struct GEN7_BLEND_STATE { - uint32_t ColorBufferBlendEnable; - uint32_t IndependentAlphaBlendEnable; + bool ColorBufferBlendEnable; + bool IndependentAlphaBlendEnable; #define BLENDFUNCTION_ADD 0 #define BLENDFUNCTION_SUBTRACT 1 #define BLENDFUNCTION_REVERSE_SUBTRACT 2 @@ -5857,14 +5857,14 @@ struct GEN7_BLEND_STATE { uint32_t ColorBlendFunction; uint32_t SourceBlendFactor; uint32_t DestinationBlendFactor; - uint32_t AlphaToCoverageEnable; - uint32_t AlphaToOneEnable; - uint32_t AlphaToCoverageDitherEnable; - uint32_t WriteDisableAlpha; - uint32_t WriteDisableRed; - uint32_t WriteDisableGreen; - uint32_t WriteDisableBlue; - uint32_t LogicOpEnable; + bool AlphaToCoverageEnable; + bool AlphaToOneEnable; + bool AlphaToCoverageDitherEnable; + bool WriteDisableAlpha; + bool WriteDisableRed; + bool WriteDisableGreen; + bool WriteDisableBlue; + bool LogicOpEnable; #define LOGICOP_CLEAR 0 #define LOGICOP_NOR 1 #define LOGICOP_AND_INVERTED 2 @@ -5882,7 +5882,7 @@ struct GEN7_BLEND_STATE { #define LOGICOP_OR 14 #define LOGICOP_SET 15 uint32_t LogicOpFunction; - uint32_t AlphaTestEnable; + bool AlphaTestEnable; #define COMPAREFUNCTION_ALWAYS 0 #define COMPAREFUNCTION_NEVER 1 #define COMPAREFUNCTION_LESS 2 @@ -5892,15 +5892,15 @@ struct GEN7_BLEND_STATE { #define COMPAREFUNCTION_NOTEQUAL 6 #define COMPAREFUNCTION_GEQUAL 7 uint32_t AlphaTestFunction; - uint32_t ColorDitherEnable; + bool ColorDitherEnable; uint32_t XDitherOffset; uint32_t YDitherOffset; #define COLORCLAMP_UNORM 0 #define COLORCLAMP_SNORM 1 #define COLORCLAMP_RTFORMAT 2 uint32_t ColorClampRange; - uint32_t PreBlendColorClampEnable; - uint32_t PostBlendColorClampEnable; + bool PreBlendColorClampEnable; + bool PostBlendColorClampEnable; }; static inline void @@ -6023,7 +6023,7 @@ GEN7_COLOR_CALC_STATE_pack(__gen_user_data *data, void * restrict dst, #define GEN7_DEPTH_STENCIL_STATE_length 0x00000003 struct GEN7_DEPTH_STENCIL_STATE { - uint32_t StencilTestEnable; + bool StencilTestEnable; #define COMPAREFUNCTION_ALWAYS 0 #define COMPAREFUNCTION_NEVER 1 #define COMPAREFUNCTION_LESS 2 @@ -6044,8 +6044,8 @@ struct GEN7_DEPTH_STENCIL_STATE { uint32_t StencilFailOp; uint32_t StencilPassDepthFailOp; uint32_t StencilPassDepthPassOp; - uint32_t StencilBufferWriteEnable; - uint32_t DoubleSidedStencilEnable; + bool StencilBufferWriteEnable; + bool DoubleSidedStencilEnable; #define COMPAREFUNCTION_ALWAYS 0 #define COMPAREFUNCTION_NEVER 1 #define COMPAREFUNCTION_LESS 2 @@ -6070,7 +6070,7 @@ struct GEN7_DEPTH_STENCIL_STATE { uint32_t StencilWriteMask; uint32_t BackfaceStencilTestMask; uint32_t BackfaceStencilWriteMask; - uint32_t DepthTestEnable; + bool DepthTestEnable; #define COMPAREFUNCTION_ALWAYS 0 #define COMPAREFUNCTION_NEVER 1 #define COMPAREFUNCTION_LESS 2 @@ -6080,7 +6080,7 @@ struct GEN7_DEPTH_STENCIL_STATE { #define COMPAREFUNCTION_NOTEQUAL 6 #define COMPAREFUNCTION_GEQUAL 7 uint32_t DepthTestFunction; - uint32_t DepthBufferWriteEnable; + bool DepthBufferWriteEnable; }; static inline void @@ -6133,9 +6133,9 @@ struct GEN7_INTERFACE_DESCRIPTOR_DATA { #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 @@ -6152,7 +6152,7 @@ struct GEN7_INTERFACE_DESCRIPTOR_DATA { #define RD 2 #define RTZ 3 uint32_t RoundingMode; - uint32_t BarrierEnable; + bool BarrierEnable; uint32_t SharedLocalMemorySize; uint32_t NumberofThreadsinGPGPUThreadGroup; }; @@ -6425,7 +6425,7 @@ GEN7_SAMPLER_BORDER_COLOR_STATE_pack(__gen_user_data *data, void * restrict dst, #define GEN7_SAMPLER_STATE_length 0x00000004 struct GEN7_SAMPLER_STATE { - uint32_t SamplerDisable; + bool SamplerDisable; #define DX10OGL 0 #define DX9 1 uint32_t TextureBorderColorMode; @@ -6465,7 +6465,7 @@ struct GEN7_SAMPLER_STATE { #define OVERRIDE 1 uint32_t CubeSurfaceControlMode; uint32_t BorderColorPointer; - uint32_t ChromaKeyEnable; + bool ChromaKeyEnable; uint32_t ChromaKeyIndex; #define KEYFILTER_KILL_ON_ANY_MATCH 0 #define KEYFILTER_REPLACE_BLACK 1 @@ -6479,17 +6479,17 @@ struct GEN7_SAMPLER_STATE { #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 MED 2 #define LOW 3 uint32_t TrilinearFilterQuality; - uint32_t NonnormalizedCoordinateEnable; + bool NonnormalizedCoordinateEnable; uint32_t TCXAddressControlMode; uint32_t TCYAddressControlMode; uint32_t TCZAddressControlMode; @@ -6554,7 +6554,7 @@ GEN7_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, #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 diff --git a/src/vulkan/gen8_pack.h b/src/vulkan/gen8_pack.h index bf6392ded4f..dd7f1b55a50 100644 --- a/src/vulkan/gen8_pack.h +++ b/src/vulkan/gen8_pack.h @@ -169,19 +169,19 @@ struct GEN8_3DSTATE_VS { #define IEEE754 0 #define Alternate 1 uint32_t FloatingPointMode; - uint32_t IllegalOpcodeExceptionEnable; - uint32_t AccessesUAV; - uint32_t SoftwareExceptionEnable; + 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; @@ -539,7 +539,7 @@ GEN8_MI_SEMAPHORE_WAIT_pack(__gen_user_data *data, void * restrict dst, 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; @@ -655,28 +655,28 @@ struct GEN8_STATE_BASE_ADDRESS { uint32_t DwordLength; __gen_address_type GeneralStateBaseAddress; struct GEN8_MEMORY_OBJECT_CONTROL_STATE GeneralStateMemoryObjectControlState; - uint32_t GeneralStateBaseAddressModifyEnable; + bool GeneralStateBaseAddressModifyEnable; struct GEN8_MEMORY_OBJECT_CONTROL_STATE StatelessDataPortAccessMemoryObjectControlState; __gen_address_type SurfaceStateBaseAddress; struct GEN8_MEMORY_OBJECT_CONTROL_STATE SurfaceStateMemoryObjectControlState; - uint32_t SurfaceStateBaseAddressModifyEnable; + bool SurfaceStateBaseAddressModifyEnable; __gen_address_type DynamicStateBaseAddress; struct GEN8_MEMORY_OBJECT_CONTROL_STATE DynamicStateMemoryObjectControlState; - uint32_t DynamicStateBaseAddressModifyEnable; + bool DynamicStateBaseAddressModifyEnable; __gen_address_type IndirectObjectBaseAddress; struct GEN8_MEMORY_OBJECT_CONTROL_STATE IndirectObjectMemoryObjectControlState; - uint32_t IndirectObjectBaseAddressModifyEnable; + bool IndirectObjectBaseAddressModifyEnable; __gen_address_type InstructionBaseAddress; struct GEN8_MEMORY_OBJECT_CONTROL_STATE InstructionMemoryObjectControlState; - uint32_t InstructionBaseAddressModifyEnable; + 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 @@ -934,11 +934,11 @@ struct GEN8_3DPRIMITIVE { 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; @@ -1544,7 +1544,7 @@ struct GEN8_3DSTATE_BLEND_STATE_POINTERS { uint32_t _3DCommandSubOpcode; uint32_t DwordLength; uint32_t BlendStatePointer; - uint32_t BlendStatePointerValid; + bool BlendStatePointerValid; }; static inline void @@ -1584,7 +1584,7 @@ struct GEN8_3DSTATE_CC_STATE_POINTERS { uint32_t _3DCommandSubOpcode; uint32_t DwordLength; uint32_t ColorCalcStatePointer; - uint32_t ColorCalcStatePointerValid; + bool ColorCalcStatePointerValid; }; static inline void @@ -1672,7 +1672,7 @@ struct GEN8_3DSTATE_CLEAR_PARAMS { uint32_t _3DCommandSubOpcode; uint32_t DwordLength; float DepthClearValue; - uint32_t DepthClearValueValid; + bool DepthClearValueValid; }; static inline void @@ -1716,37 +1716,37 @@ struct GEN8_3DSTATE_CLIP { 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; float MinimumPointWidth; float MaximumPointWidth; - uint32_t ForceZeroRTAIndexEnable; + bool ForceZeroRTAIndexEnable; uint32_t MaximumVPIndex; }; @@ -2078,9 +2078,9 @@ struct GEN8_3DSTATE_DEPTH_BUFFER { #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 @@ -2247,20 +2247,20 @@ struct GEN8_3DSTATE_DS { #define IEEE754 0 #define Alternate 1 uint32_t FloatingPointMode; - uint32_t AccessesUAV; - uint32_t IllegalOpcodeExceptionEnable; - uint32_t SoftwareExceptionEnable; + 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; @@ -2368,7 +2368,7 @@ struct GEN8_3DSTATE_GATHER_CONSTANT_DS { uint32_t ConstantBufferValid; uint32_t ConstantBufferBindingTableBlock; uint32_t GatherBufferOffset; - uint32_t ConstantBufferDx9GenerateStall; + bool ConstantBufferDx9GenerateStall; /* variable length fields follow */ }; @@ -2415,7 +2415,7 @@ struct GEN8_3DSTATE_GATHER_CONSTANT_GS { uint32_t ConstantBufferValid; uint32_t ConstantBufferBindingTableBlock; uint32_t GatherBufferOffset; - uint32_t ConstantBufferDx9GenerateStall; + bool ConstantBufferDx9GenerateStall; /* variable length fields follow */ }; @@ -2462,7 +2462,7 @@ struct GEN8_3DSTATE_GATHER_CONSTANT_HS { uint32_t ConstantBufferValid; uint32_t ConstantBufferBindingTableBlock; uint32_t GatherBufferOffset; - uint32_t ConstantBufferDx9GenerateStall; + bool ConstantBufferDx9GenerateStall; /* variable length fields follow */ }; @@ -2509,8 +2509,8 @@ struct GEN8_3DSTATE_GATHER_CONSTANT_PS { uint32_t ConstantBufferValid; uint32_t ConstantBufferBindingTableBlock; uint32_t GatherBufferOffset; - uint32_t ConstantBufferDx9GenerateStall; - uint32_t ConstantBufferDx9Enable; + bool ConstantBufferDx9GenerateStall; + bool ConstantBufferDx9Enable; /* variable length fields follow */ }; @@ -2558,8 +2558,8 @@ struct GEN8_3DSTATE_GATHER_CONSTANT_VS { uint32_t ConstantBufferValid; uint32_t ConstantBufferBindingTableBlock; uint32_t GatherBufferOffset; - uint32_t ConstantBufferDx9GenerateStall; - uint32_t ConstantBufferDx9Enable; + bool ConstantBufferDx9GenerateStall; + bool ConstantBufferDx9Enable; /* variable length fields follow */ }; @@ -2607,7 +2607,7 @@ struct GEN8_3DSTATE_GATHER_POOL_ALLOC { uint32_t _3DCommandSubOpcode; uint32_t DwordLength; __gen_address_type GatherPoolBaseAddress; - uint32_t GatherPoolEnable; + bool GatherPoolEnable; struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; uint32_t GatherPoolBufferSize; }; @@ -2678,17 +2678,17 @@ struct GEN8_3DSTATE_GS { #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; 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; @@ -2700,19 +2700,19 @@ struct GEN8_3DSTATE_GS { #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; @@ -2887,21 +2887,21 @@ struct GEN8_3DSTATE_HS { #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; 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; @@ -3042,7 +3042,7 @@ struct GEN8_3DSTATE_LINE_STIPPLE { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t ModifyEnableCurrentRepeatCounterCurrentStippleIndex; + bool ModifyEnableCurrentRepeatCounterCurrentStippleIndex; uint32_t CurrentRepeatCounter; uint32_t CurrentStippleIndex; uint32_t LineStipplePattern; @@ -3283,22 +3283,22 @@ struct GEN8_3DSTATE_PS { #define RD 2 #define RTZ 3 uint32_t RoundingMode; - uint32_t IllegalOpcodeExceptionEnable; - uint32_t MaskStackExceptionEnable; - uint32_t SoftwareExceptionEnable; + 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; @@ -3397,15 +3397,15 @@ struct GEN8_3DSTATE_PS_BLEND { 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 @@ -3451,24 +3451,24 @@ struct GEN8_3DSTATE_PS_EXTRA { 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 @@ -3741,16 +3741,16 @@ struct GEN8_3DSTATE_RASTER { #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 @@ -3759,9 +3759,9 @@ struct GEN8_3DSTATE_RASTER { #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; @@ -4253,17 +4253,17 @@ struct GEN8_3DSTATE_SBE { 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; @@ -4320,10 +4320,10 @@ GEN8_3DSTATE_SBE_pack(__gen_user_data *data, void * restrict dst, .DwordLength = 9 struct GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL { - uint32_t ComponentOverrideW; - uint32_t ComponentOverrideZ; - uint32_t ComponentOverrideY; - uint32_t ComponentOverrideX; + bool ComponentOverrideW; + bool ComponentOverrideZ; + bool ComponentOverrideY; + bool ComponentOverrideX; uint32_t SwizzleControlMode; #define CONST_0000 0 #define CONST_0001_FLOAT 1 @@ -4479,22 +4479,22 @@ struct GEN8_3DSTATE_SF { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t LegacyGlobalDepthBiasEnable; - uint32_t StatisticsEnable; - uint32_t ViewportTransformEnable; + 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 @@ -4556,11 +4556,11 @@ struct GEN8_3DSTATE_SO_BUFFER { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t SOBufferEnable; + bool SOBufferEnable; uint32_t SOBufferIndex; struct GEN8_MEMORY_OBJECT_CONTROL_STATE SOBufferObjectControlState; - uint32_t StreamOffsetWriteEnable; - uint32_t StreamOutputBufferOffsetAddressEnable; + bool StreamOffsetWriteEnable; + bool StreamOutputBufferOffsetAddressEnable; __gen_address_type SurfaceBaseAddress; uint32_t SurfaceSize; __gen_address_type StreamOutputBufferOffsetAddress; @@ -4809,7 +4809,7 @@ struct GEN8_3DSTATE_STREAMOUT { #define LEADING 0 #define TRAILING 1 uint32_t ReorderMode; - uint32_t SOStatisticsEnable; + bool SOStatisticsEnable; #define Normal 0 #define Resreved 1 #define Force_Off 2 @@ -4895,9 +4895,9 @@ struct GEN8_3DSTATE_TE { #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 @@ -4906,7 +4906,7 @@ struct GEN8_3DSTATE_TE { #define HW_TESS 0 #define SW_TESS 1 uint32_t TEMode; - uint32_t TEEnable; + bool TEEnable; float MaximumTessellationFactorOdd; float MaximumTessellationFactorNotOdd; }; @@ -5080,7 +5080,7 @@ struct GEN8_VERTEX_BUFFER_STATE { uint32_t VertexBufferIndex; struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; uint32_t AddressModifyEnable; - uint32_t NullVertexBuffer; + bool NullVertexBuffer; uint32_t BufferPitch; __gen_address_type BufferStartingAddress; uint32_t BufferSize; @@ -5152,9 +5152,9 @@ GEN8_3DSTATE_VERTEX_BUFFERS_pack(__gen_user_data *data, void * restrict dst, struct GEN8_VERTEX_ELEMENT_STATE { uint32_t VertexBufferIndex; - uint32_t Valid; + bool Valid; uint32_t SourceElementFormat; - uint32_t EdgeFlagEnable; + bool EdgeFlagEnable; uint32_t SourceElementOffset; uint32_t Component0Control; uint32_t Component1Control; @@ -5225,7 +5225,7 @@ struct GEN8_3DSTATE_VF { uint32_t CommandSubType; uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; - uint32_t IndexedDrawCutIndexEnable; + bool IndexedDrawCutIndexEnable; uint32_t DwordLength; uint32_t CutIndex; }; @@ -5266,7 +5266,7 @@ struct GEN8_3DSTATE_VF_INSTANCING { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t InstancingEnable; + bool InstancingEnable; uint32_t VertexElementIndex; uint32_t InstanceDataStepRate; }; @@ -5311,14 +5311,14 @@ struct GEN8_3DSTATE_VF_SGVS { 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 @@ -5365,7 +5365,7 @@ struct GEN8_3DSTATE_VF_STATISTICS { uint32_t CommandSubType; uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; - uint32_t StatisticsEnable; + bool StatisticsEnable; }; static inline void @@ -5513,11 +5513,11 @@ struct GEN8_3DSTATE_WM { 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 @@ -5541,8 +5541,8 @@ struct GEN8_3DSTATE_WM { #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; @@ -5601,7 +5601,7 @@ struct GEN8_3DSTATE_WM_CHROMAKEY { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t ChromaKeyKillEnable; + bool ChromaKeyKillEnable; }; static inline void @@ -5648,13 +5648,11 @@ struct GEN8_3DSTATE_WM_DEPTH_STENCIL { 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; @@ -5716,13 +5714,13 @@ struct GEN8_3DSTATE_WM_HZ_OP { 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; @@ -5788,8 +5786,8 @@ struct GEN8_GPGPU_WALKER { 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; @@ -5992,7 +5990,7 @@ struct GEN8_MEDIA_OBJECT { uint32_t MediaCommandSubOpcode; uint32_t DwordLength; uint32_t InterfaceDescriptorOffset; - uint32_t ChildrenPresent; + bool ChildrenPresent; #define Nothreadsynchronization 0 #define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 uint32_t ThreadSynchronization; @@ -6013,7 +6011,7 @@ struct GEN8_MEDIA_OBJECT { uint32_t ScoredboardY; uint32_t ScoreboardX; uint32_t ScoreboardColor; - uint32_t ScoreboardMask; + bool ScoreboardMask; /* variable length fields follow */ }; @@ -6096,7 +6094,7 @@ struct GEN8_MEDIA_OBJECT_GRPID { uint32_t ScoredboardY; uint32_t ScoreboardX; uint32_t ScoreboardColor; - uint32_t ScoreboardMask; + bool ScoreboardMask; uint32_t GroupID; /* variable length fields follow */ }; @@ -6167,8 +6165,8 @@ struct GEN8_MEDIA_OBJECT_PRT { 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; @@ -6222,7 +6220,7 @@ struct GEN8_MEDIA_OBJECT_WALKER { uint32_t SubOpcode; uint32_t DwordLength; uint32_t InterfaceDescriptorOffset; - uint32_t ChildrenPresent; + bool ChildrenPresent; #define Nothreadsynchronization 0 #define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 uint32_t ThreadSynchronization; @@ -6232,7 +6230,7 @@ struct GEN8_MEDIA_OBJECT_WALKER { uint32_t IndirectDataLength; uint32_t IndirectDataStartAddress; uint32_t GroupIDLoopSelect; - uint32_t ScoreboardMask; + bool ScoreboardMask; uint32_t ColorCountMinusOne; uint32_t MiddleLoopExtraSteps; uint32_t LocalMidLoopUnitY; @@ -6368,7 +6366,7 @@ struct GEN8_MEDIA_STATE_FLUSH { uint32_t MediaCommandOpcode; uint32_t SubOpcode; uint32_t DwordLength; - uint32_t FlushtoGO; + bool FlushtoGO; uint32_t WatermarkRequired; uint32_t InterfaceDescriptorOffset; }; @@ -6581,9 +6579,9 @@ struct GEN8_MI_BATCH_BUFFER_START { #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; @@ -6826,7 +6824,7 @@ GEN8_MI_LOAD_REGISTER_IMM_pack(__gen_user_data *data, void * restrict dst, 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; @@ -6918,7 +6916,7 @@ struct GEN8_MI_LOAD_SCAN_LINES_INCL { #define NeverForward 0 #define AlwaysForward 1 #define ConditionallyForward 2 - uint32_t ScanLineEventDoneForward; + bool ScanLineEventDoneForward; uint32_t DwordLength; uint32_t StartScanLineNumber; uint32_t EndScanLineNumber; @@ -7033,7 +7031,7 @@ GEN8_MI_MATH_pack(__gen_user_data *data, void * restrict dst, struct GEN8_MI_NOOP { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t IdentificationNumberRegisterWriteEnable; + bool IdentificationNumberRegisterWriteEnable; uint32_t IdentificationNumber; }; @@ -7061,9 +7059,9 @@ GEN8_MI_NOOP_pack(__gen_user_data *data, void * restrict dst, 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 @@ -7124,8 +7122,8 @@ GEN8_MI_REPORT_HEAD_pack(__gen_user_data *data, void * restrict dst, 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; }; @@ -7152,8 +7150,8 @@ GEN8_MI_RS_CONTEXT_pack(__gen_user_data *data, void * restrict dst, 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; }; @@ -7228,9 +7226,9 @@ struct GEN8_MI_SET_CONTEXT { 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; }; @@ -7306,8 +7304,8 @@ GEN8_MI_SET_PREDICATE_pack(__gen_user_data *data, void * restrict dst, 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; @@ -7444,7 +7442,7 @@ GEN8_MI_STORE_URB_MEM_pack(__gen_user_data *data, void * restrict dst, struct GEN8_MI_SUSPEND_FLUSH { uint32_t CommandType; uint32_t MICommandOpcode; - uint32_t SuspendFlush; + bool SuspendFlush; }; static inline void @@ -7616,18 +7614,18 @@ GEN8_MI_USER_INTERRUPT_pack(__gen_user_data *data, void * restrict dst, 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 @@ -7682,29 +7680,29 @@ struct GEN8_PIPE_CONTROL { #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; uint64_t ImmediateData; @@ -7904,26 +7902,26 @@ GEN8_SF_CLIP_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, #define GEN8_BLEND_STATE_length 0x00000011 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 @@ -7955,13 +7953,13 @@ GEN8_BLEND_STATE_ENTRY_pack(__gen_user_data *data, void * restrict dst, } struct GEN8_BLEND_STATE { - uint32_t AlphaToCoverageEnable; - uint32_t IndependentAlphaBlendEnable; - uint32_t AlphaToOneEnable; - uint32_t AlphaToCoverageDitherEnable; - uint32_t AlphaTestEnable; + bool AlphaToCoverageEnable; + bool IndependentAlphaBlendEnable; + bool AlphaToOneEnable; + bool AlphaToCoverageDitherEnable; + bool AlphaTestEnable; uint32_t AlphaTestFunction; - uint32_t ColorDitherEnable; + bool ColorDitherEnable; uint32_t XDitherOffset; uint32_t YDitherOffset; struct GEN8_BLEND_STATE_ENTRY Entry; @@ -8083,12 +8081,12 @@ struct GEN8_VEB_DI_IECP_COMMAND_SURFACE_CONTROL_BITS { #define LLCeLLCAllowed 2 #define L3LLCeLLCAllowed 3 uint32_t TargetCacheTC; - uint32_t EncryptedData; + bool EncryptedData; #define PoorChance 3 #define NormalChance 2 #define BetterChance 1 #define BestChance 0 - uint32_t AgeforQUADLRUAGE; + bool AgeforQUADLRUAGE; }; static inline void @@ -8123,9 +8121,9 @@ struct GEN8_INTERFACE_DESCRIPTOR_DATA { #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 @@ -8142,7 +8140,7 @@ struct GEN8_INTERFACE_DESCRIPTOR_DATA { #define RD 2 #define RTZ 3 uint32_t RoundingMode; - uint32_t BarrierEnable; + bool BarrierEnable; #define Encodes0k 0 #define Encodes4k 1 #define Encodes8k 2 @@ -8237,7 +8235,7 @@ struct GEN8_RENDER_SURFACE_STATE { #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 @@ -8254,7 +8252,7 @@ struct GEN8_RENDER_SURFACE_STATE { uint32_t TileMode; uint32_t VerticalLineStride; uint32_t VerticalLineStrideOffset; - uint32_t SamplerL2BypassModeDisable; + bool SamplerL2BypassModeDisable; #define WriteOnlyCache 0 #define ReadWriteCache 1 uint32_t RenderCacheReadWriteMode; @@ -8262,12 +8260,12 @@ struct GEN8_RENDER_SURFACE_STATE { #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; + bool CubeFaceEnablePositiveZ; + bool CubeFaceEnableNegativeZ; + bool CubeFaceEnablePositiveY; + bool CubeFaceEnableNegativeY; + bool CubeFaceEnablePositiveX; + bool CubeFaceEnableNegativeX; struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; float BaseMipLevel; uint32_t SurfaceQPitch; @@ -8292,7 +8290,7 @@ struct GEN8_RENDER_SURFACE_STATE { uint32_t MultisamplePositionPaletteIndex; uint32_t XOffset; uint32_t YOffset; - uint32_t EWADisableForCube; + bool EWADisableForCube; #define GPUcoherent 0 #define IAcoherent 1 uint32_t CoherencyType; @@ -8305,7 +8303,7 @@ struct GEN8_RENDER_SURFACE_STATE { #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; @@ -8445,7 +8443,7 @@ GEN8_RENDER_SURFACE_STATE_pack(__gen_user_data *data, void * restrict dst, #define GEN8_SAMPLER_STATE_length 0x00000004 struct GEN8_SAMPLER_STATE { - uint32_t SamplerDisable; + bool SamplerDisable; #define DX10OGL 0 #define DX9 1 uint32_t TextureBorderColorMode; @@ -8473,7 +8471,7 @@ struct GEN8_SAMPLER_STATE { uint32_t AnisotropicAlgorithm; float MinLOD; float MaxLOD; - uint32_t ChromaKeyEnable; + bool ChromaKeyEnable; uint32_t ChromaKeyIndex; #define KEYFILTER_KILL_ON_ANY_MATCH 0 #define KEYFILTER_REPLACE_BLACK 1 @@ -8503,18 +8501,18 @@ struct GEN8_SAMPLER_STATE { #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; @@ -8580,7 +8578,7 @@ GEN8_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, #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 @@ -8634,21 +8632,21 @@ GEN8_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, #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 diff --git a/src/vulkan/pipeline.c b/src/vulkan/pipeline.c index cd4294bfa08..bf8b3a0bea2 100644 --- a/src/vulkan/pipeline.c +++ b/src/vulkan/pipeline.c @@ -136,7 +136,7 @@ emit_ia_state(struct anv_pipeline *pipeline, [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP] = _3DPRIM_TRISTRIP, [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN] = _3DPRIM_TRIFAN, [VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ] = _3DPRIM_LINELIST_ADJ, - [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ] = _3DPRIM_LISTSTRIP_ADJ, + [VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ] = _3DPRIM_LINESTRIP_ADJ, [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ] = _3DPRIM_TRILIST_ADJ, [VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ] = _3DPRIM_TRISTRIP_ADJ, [VK_PRIMITIVE_TOPOLOGY_PATCH] = _3DPRIM_PATCHLIST_1 -- 2.30.2