diff options
author | Nanley Chery <[email protected]> | 2016-03-31 10:04:46 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2016-04-13 17:53:38 -0700 |
commit | 992bbed98d0eb226c2ad45eafb3cb2ad68f3fed7 (patch) | |
tree | aa59e9715cc15beea4d68a9aabe5b8a3bbb99c93 /src/intel/vulkan | |
parent | 88d1c19c9dfd6be1a374917f707e3c77089d7013 (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')
-rw-r--r-- | src/intel/vulkan/gen7_pipeline.c | 4 | ||||
-rw-r--r-- | src/intel/vulkan/gen8_pipeline.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/vulkan/gen7_pipeline.c b/src/intel/vulkan/gen7_pipeline.c index 37e4639b287..10397343e5f 100644 --- a/src/intel/vulkan/gen7_pipeline.c +++ b/src/intel/vulkan/gen7_pipeline.c @@ -47,7 +47,7 @@ gen7_emit_rs_state(struct anv_pipeline *pipeline, .StatisticsEnable = true, .FrontFaceFillMode = vk_to_gen_fillmode[info->polygonMode], .BackFaceFillMode = vk_to_gen_fillmode[info->polygonMode], - .ViewTransformEnable = !(extra && extra->disable_viewport), + .ViewTransformEnable = !(extra && extra->use_rectlist), .FrontWinding = vk_to_gen_front_face[info->frontFace], /* bool AntiAliasingEnable; */ @@ -225,7 +225,7 @@ genX(graphics_pipeline_create)( anv_batch_emit(&pipeline->batch, GENX(3DSTATE_CLIP), .FrontWinding = vk_to_gen_front_face[rs_info->frontFace], .CullMode = vk_to_gen_cullmode[rs_info->cullMode], - .ClipEnable = true, + .ClipEnable = !(extra && extra->use_rectlist), .APIMode = APIMODE_OGL, .ViewportXYClipTestEnable = !(extra && extra->disable_viewport), .ClipMode = CLIPMODE_NORMAL, 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), |