vulkan: Rename viewport_state::negative_one_to_one

This makes it a bit clearer what it's for.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18878>
This commit is contained in:
Jason Ekstrand
2022-07-21 13:54:16 -05:00
committed by Marge Bot
parent 76a4d5ce89
commit 10bc2cd3ae
6 changed files with 7 additions and 7 deletions

View File

@@ -6179,7 +6179,7 @@ radv_graphics_pipeline_init(struct radv_graphics_pipeline *pipeline, struct radv
radv_pipeline_init_dynamic_state(pipeline, &state);
if (state.vp)
pipeline->negative_one_to_one = state.vp->negative_one_to_one;
pipeline->negative_one_to_one = state.vp->depth_clip_negative_one_to_one;
radv_pipeline_init_raster_state(pipeline, &state);

View File

@@ -955,8 +955,8 @@ static void handle_graphics_pipeline(struct vk_cmd_queue_entry *cmd,
state->scissor_dirty = true;
}
if (state->rs_state.clip_halfz != !ps->vp->negative_one_to_one) {
state->rs_state.clip_halfz = !ps->vp->negative_one_to_one;
if (state->rs_state.clip_halfz != !ps->vp->depth_clip_negative_one_to_one) {
state->rs_state.clip_halfz = !ps->vp->depth_clip_negative_one_to_one;
state->rs_dirty = true;
for (uint32_t i = 0; i < state->num_viewports; i++)
set_viewport_depth_xform(state, i);

View File

@@ -2297,7 +2297,7 @@ anv_graphics_pipeline_init(struct anv_graphics_pipeline *pipeline,
}
pipeline->negative_one_to_one =
state->vp != NULL && state->vp->negative_one_to_one;
state->vp != NULL && state->vp->depth_clip_negative_one_to_one;
/* Store line mode, polygon mode and rasterization samples, these are used
* for dynamic primitive topology.

View File

@@ -1931,7 +1931,7 @@ anv_graphics_pipeline_init(struct anv_graphics_pipeline *pipeline,
pipeline->instance_multiplier = util_bitcount(pipeline->view_mask);
pipeline->negative_one_to_one =
state->vp != NULL && state->vp->negative_one_to_one;
state->vp != NULL && state->vp->depth_clip_negative_one_to_one;
/* Store line mode, polygon mode and rasterization samples, these are used
* for dynamic primitive topology.

View File

@@ -376,7 +376,7 @@ vk_viewport_state_init(struct vk_viewport_state *vp,
vk_find_struct_const(vp_info->pNext,
PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT);
if (vp_dcc_info != NULL)
vp->negative_one_to_one = vp_dcc_info->negativeOneToOne;
vp->depth_clip_negative_one_to_one = vp_dcc_info->negativeOneToOne;
}
static void

View File

@@ -150,7 +150,7 @@ struct vk_tessellation_state {
struct vk_viewport_state {
/** VkPipelineViewportDepthClipControlCreateInfoEXT::negativeOneToOne */
bool negative_one_to_one;
bool depth_clip_negative_one_to_one;
/** VkPipelineViewportStateCreateInfo::viewportCount */
uint8_t viewport_count;