|
|
@@ -1014,14 +1014,35 @@ emit_3dstate_clip(struct anv_pipeline *pipeline, |
|
|
|
|
|
|
|
clip.MinimumPointWidth = 0.125; |
|
|
|
clip.MaximumPointWidth = 255.875; |
|
|
|
clip.MaximumVPIndex = (vp_info ? vp_info->viewportCount : 1) - 1; |
|
|
|
|
|
|
|
const struct brw_vue_prog_data *last = |
|
|
|
anv_pipeline_get_last_vue_prog_data(pipeline); |
|
|
|
|
|
|
|
/* From the Vulkan 1.0.45 spec: |
|
|
|
* |
|
|
|
* "If the last active vertex processing stage shader entry point's |
|
|
|
* interface does not include a variable decorated with |
|
|
|
* ViewportIndex, then the first viewport is used." |
|
|
|
*/ |
|
|
|
if (vp_info && (last->vue_map.slots_valid & VARYING_BIT_VIEWPORT)) { |
|
|
|
clip.MaximumVPIndex = vp_info->viewportCount - 1; |
|
|
|
} else { |
|
|
|
clip.MaximumVPIndex = 0; |
|
|
|
} |
|
|
|
|
|
|
|
/* From the Vulkan 1.0.45 spec: |
|
|
|
* |
|
|
|
* "If the last active vertex processing stage shader entry point's |
|
|
|
* interface does not include a variable decorated with Layer, then |
|
|
|
* the first layer is used." |
|
|
|
*/ |
|
|
|
clip.ForceZeroRTAIndexEnable = |
|
|
|
!(last->vue_map.slots_valid & VARYING_BIT_LAYER); |
|
|
|
|
|
|
|
#if GEN_GEN == 7 |
|
|
|
clip.FrontWinding = vk_to_gen_front_face[rs_info->frontFace]; |
|
|
|
clip.CullMode = vk_to_gen_cullmode[rs_info->cullMode]; |
|
|
|
clip.ViewportZClipTestEnable = !pipeline->depth_clamp_enable; |
|
|
|
const struct brw_vue_prog_data *last = |
|
|
|
anv_pipeline_get_last_vue_prog_data(pipeline); |
|
|
|
if (last) { |
|
|
|
clip.UserClipDistanceClipTestEnableBitmask = last->clip_distance_mask; |
|
|
|
clip.UserClipDistanceCullTestEnableBitmask = last->cull_distance_mask; |