#define VERTEX_CLIPCULL_DIST_LO_SLOT 35 // VS writes lower 4 clip/cull dist
#define VERTEX_CLIPCULL_DIST_HI_SLOT 36 // VS writes upper 4 clip/cull dist
#define VERTEX_POINT_SIZE_SLOT 37 // VS writes point size here
+#define VERTEX_VIEWPORT_ARRAY_INDEX_SLOT 38
// SoAoSoA
struct simdvertex
{
uint32_t lod; // for render targets, the lod being rendered to
uint32_t arrayIndex; // for render targets, the array index being rendered to for arrayed surfaces
SWR_TILE_MODE tileMode; // @llvm_enum
- bool bInterleavedSamples; // are MSAA samples stored interleaved or planar
uint32_t halign;
uint32_t valign;
uint32_t xOffset;
uint32_t lodOffsets[2][15]; // lod offsets for sampled surfaces
uint8_t *pAuxBaseAddress; // Used for compression, append/consume counter, etc.
+
+ bool bInterleavedSamples; // are MSAA samples stored interleaved or planar
};
// vertex fetch state
// The stream masks specify which attributes are sent to which streams.
// These masks help the FE to setup the pPrimData buffer that is passed
- // the the Stream Output Shader (SOS) function.
+ // the Stream Output Shader (SOS) function.
uint32_t streamMasks[MAX_SO_STREAMS];
// Number of attributes, including position, per vertex that are streamed out.
// geometry shader emits PrimitiveID
bool emitsPrimitiveID;
+ // geometry shader emits ViewportArrayIndex
+ bool emitsViewportArrayIndex;
+
// if true, geometry shader emits a single stream, with separate cut buffer.
// if false, geometry shader emits vertices for multiple streams to the stream buffer, with a separate StreamID buffer
// to map vertices to streams
// skip clip test, perspective divide, and viewport transform
// intended for verts in screen space
bool vpTransformDisable;
+ bool bEnableCutIndex;
union
{
struct
uint32_t triStripList : 2;
};
uint32_t bits;
- }provokingVertex;
+ } provokingVertex;
uint32_t topologyProvokingVertex; // provoking vertex for the draw topology
};
//////////////////////////////////////////////////////////////////////////
struct SWR_RASTSTATE
{
- uint32_t cullMode : 2;
- uint32_t fillMode : 2;
- uint32_t frontWinding : 1;
- uint32_t scissorEnable : 1;
- uint32_t depthClipEnable : 1;
+ uint32_t cullMode : 2;
+ uint32_t fillMode : 2;
+ uint32_t frontWinding : 1;
+ uint32_t scissorEnable : 1;
+ uint32_t depthClipEnable : 1;
+ uint32_t pointParam : 1;
+ uint32_t pointSpriteEnable : 1;
+ uint32_t pointSpriteTopOrigin : 1;
+ uint32_t msaaRastEnable : 1;
+ uint32_t forcedSampleCount : 1;
+ uint32_t pixelOffset : 1;
+ uint32_t depthBiasPreAdjusted : 1; ///< depth bias constant is in float units, not per-format Z units
+ uint32_t conservativeRast : 1;
+
float pointSize;
float lineWidth;
- // point size output from the VS
- bool pointParam;
-
- // point sprite
- bool pointSpriteEnable;
- bool pointSpriteTopOrigin;
-
- // depth bias
float depthBias;
float slopeScaledDepthBias;
float depthBiasClamp;
///@todo: MSAA lines
// multisample state for MSAA lines
- bool msaaRastEnable;
SWR_MSAA_RASTMODE rastMode; // @llvm_enum
// sample count the rasterizer is running at
SWR_MULTISAMPLE_COUNT sampleCount; // @llvm_enum
- bool bForcedSampleCount;
uint32_t pixelLocation; // UL or Center
- bool pixelOffset; // offset pixel positions by .5 in both the horizontal and vertical direction
SWR_MULTISAMPLE_POS iSamplePos[SWR_MAX_NUM_MULTISAMPLES];
SWR_MSAA_SAMPLE_PATTERN samplePattern; // @llvm_enum
{
SWR_INPUT_COVERAGE_NONE,
SWR_INPUT_COVERAGE_NORMAL,
+ SWR_INPUT_COVERAGE_INNER_CONSERVATIVE,
SWR_INPUT_COVERAGE_MAX,
};
// dword 2
uint32_t killsPixel : 1; // pixel shader can kill pixels
- uint32_t inputCoverage : 1; // type of input coverage PS uses
+ uint32_t inputCoverage : 1; // ps uses input coverage
uint32_t writesODepth : 1; // pixel shader writes to depth
uint32_t usesSourceDepth : 1; // pixel shader reads depth
uint32_t shadingRate : 2; // shading per pixel / sample / coarse pixel