aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-08-06 07:55:10 -0700
committerJason Ekstrand <[email protected]>2016-08-08 11:13:31 -0700
commit1df511b6f07455b68b3500aa230c457eaa8e2a87 (patch)
tree8727fc887654948df674a3417c47ec390e614678
parent6136fb8687d216565ea481875e651ff23b13bfd3 (diff)
anv/pipeline/gen8: Use fewer designated initializers in emit_rs_state
Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/intel/vulkan/gen8_pipeline.c53
1 files changed, 27 insertions, 26 deletions
diff --git a/src/intel/vulkan/gen8_pipeline.c b/src/intel/vulkan/gen8_pipeline.c
index e8283596519..7f8734a4c27 100644
--- a/src/intel/vulkan/gen8_pipeline.c
+++ b/src/intel/vulkan/gen8_pipeline.c
@@ -57,42 +57,43 @@ emit_rs_state(struct anv_pipeline *pipeline,
struct GENX(3DSTATE_SF) sf = {
GENX(3DSTATE_SF_header),
- .ViewportTransformEnable = !(extra && extra->use_rectlist),
- .TriangleStripListProvokingVertexSelect = 0,
- .LineStripListProvokingVertexSelect = 0,
- .TriangleFanProvokingVertexSelect = 1,
- .PointWidthSource = Vertex,
- .PointWidth = 1.0,
};
+ sf.ViewportTransformEnable = !(extra && extra->use_rectlist);
+ sf.TriangleStripListProvokingVertexSelect = 0;
+ sf.LineStripListProvokingVertexSelect = 0;
+ sf.TriangleFanProvokingVertexSelect = 1;
+ sf.PointWidthSource = Vertex;
+ sf.PointWidth = 1.0;
+
GENX(3DSTATE_SF_pack)(NULL, pipeline->gen8.sf, &sf);
struct GENX(3DSTATE_RASTER) raster = {
GENX(3DSTATE_RASTER_header),
+ };
- /* For details on 3DSTATE_RASTER multisample state, see the BSpec table
- * "Multisample Modes State".
- */
- .DXMultisampleRasterizationEnable = samples > 1,
- .ForcedSampleCount = FSC_NUMRASTSAMPLES_0,
- .ForceMultisampling = false,
-
- .FrontWinding = vk_to_gen_front_face[info->frontFace],
- .CullMode = vk_to_gen_cullmode[info->cullMode],
- .FrontFaceFillMode = vk_to_gen_fillmode[info->polygonMode],
- .BackFaceFillMode = vk_to_gen_fillmode[info->polygonMode],
- .ScissorRectangleEnable = !(extra && extra->use_rectlist),
+ /* For details on 3DSTATE_RASTER multisample state, see the BSpec table
+ * "Multisample Modes State".
+ */
+ raster.DXMultisampleRasterizationEnable = samples > 1;
+ raster.ForcedSampleCount = FSC_NUMRASTSAMPLES_0;
+ raster.ForceMultisampling = false;
+
+ raster.FrontWinding = vk_to_gen_front_face[info->frontFace];
+ raster.CullMode = vk_to_gen_cullmode[info->cullMode];
+ raster.FrontFaceFillMode = vk_to_gen_fillmode[info->polygonMode];
+ raster.BackFaceFillMode = vk_to_gen_fillmode[info->polygonMode];
+ raster.ScissorRectangleEnable = !(extra && extra->use_rectlist);
#if GEN_GEN == 8
- .ViewportZClipTestEnable = !pipeline->depth_clamp_enable,
+ raster.ViewportZClipTestEnable = !pipeline->depth_clamp_enable;
#else
- /* GEN9+ splits ViewportZClipTestEnable into near and far enable bits */
- .ViewportZFarClipTestEnable = !pipeline->depth_clamp_enable,
- .ViewportZNearClipTestEnable = !pipeline->depth_clamp_enable,
+ /* GEN9+ splits ViewportZClipTestEnable into near and far enable bits */
+ raster.ViewportZFarClipTestEnable = !pipeline->depth_clamp_enable;
+ raster.ViewportZNearClipTestEnable = !pipeline->depth_clamp_enable;
#endif
- .GlobalDepthOffsetEnableSolid = info->depthBiasEnable,
- .GlobalDepthOffsetEnableWireframe = info->depthBiasEnable,
- .GlobalDepthOffsetEnablePoint = info->depthBiasEnable,
- };
+ raster.GlobalDepthOffsetEnableSolid = info->depthBiasEnable;
+ raster.GlobalDepthOffsetEnableWireframe = info->depthBiasEnable;
+ raster.GlobalDepthOffsetEnablePoint = info->depthBiasEnable;
GENX(3DSTATE_RASTER_pack)(NULL, pipeline->gen8.raster, &raster);
}