summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/gen8_pipeline.c
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2016-03-31 10:04:46 -0700
committerNanley Chery <[email protected]>2016-04-13 17:53:38 -0700
commit992bbed98d0eb226c2ad45eafb3cb2ad68f3fed7 (patch)
treeaa59e9715cc15beea4d68a9aabe5b8a3bbb99c93 /src/intel/vulkan/gen8_pipeline.c
parent88d1c19c9dfd6be1a374917f707e3c77089d7013 (diff)
gen{7,8}_pipeline: Apply 3DPRIM_RECTLIST restrictions
According to 3D Primitives Overview in the Bspec, when the RECTLIST primitive is in use, the CLIP stage should be disabled or set to have a different Clip Mode, and Viewport Mapping must be disabled: Clipping: Must not require clipping or rely on the CLIP unit’s ClipTest logic to determine if clipping is required. Either the CLIP unit should be DISABLED, or the CLIP unit’s Clip Mode should be set to a value other than CLIPMODE_NORMAL. Viewport Mapping must be DISABLED (as is typical with the use of screen-space coordinates). We swap out ::disable_viewport for ::use_rectlist, because we currently always use the RECTLIST primitive when we disable viewport mapping, and we'll likely continue to use this primitive. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Kristian Høgsberg Kristensen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/gen8_pipeline.c')
-rw-r--r--src/intel/vulkan/gen8_pipeline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/gen8_pipeline.c b/src/intel/vulkan/gen8_pipeline.c
index b8b29d46b8a..0d71e0719da 100644
--- a/src/intel/vulkan/gen8_pipeline.c
+++ b/src/intel/vulkan/gen8_pipeline.c
@@ -56,7 +56,7 @@ emit_rs_state(struct anv_pipeline *pipeline,
struct GENX(3DSTATE_SF) sf = {
GENX(3DSTATE_SF_header),
- .ViewportTransformEnable = !(extra && extra->disable_viewport),
+ .ViewportTransformEnable = !(extra && extra->use_rectlist),
.TriangleStripListProvokingVertexSelect = 0,
.LineStripListProvokingVertexSelect = 0,
.TriangleFanProvokingVertexSelect = 1,
@@ -348,7 +348,7 @@ genX(graphics_pipeline_create)(
const struct brw_wm_prog_data *wm_prog_data = get_wm_prog_data(pipeline);
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_CLIP),
- .ClipEnable = true,
+ .ClipEnable = !(extra && extra->use_rectlist),
.EarlyCullEnable = true,
.APIMode = 1, /* D3D */
.ViewportXYClipTestEnable = !(extra && extra->disable_viewport),