anv: use the float qualifier to denote the right value
Signed-off-by: Rohan Garg <rohan.garg@intel.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34824>
This commit is contained in:
@@ -624,9 +624,9 @@ blorp_emit_cc_viewport(struct blorp_batch *batch)
|
||||
} else {
|
||||
blorp_emit_dynamic(batch, GENX(CC_VIEWPORT), vp, 32, &cc_vp_offset) {
|
||||
vp.MinimumDepth = batch->blorp->config.use_unrestricted_depth_range ?
|
||||
-FLT_MAX : 0.0;
|
||||
-FLT_MAX : 0.0f;
|
||||
vp.MaximumDepth = batch->blorp->config.use_unrestricted_depth_range ?
|
||||
FLT_MAX : 1.0;
|
||||
FLT_MAX : 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2283,9 +2283,9 @@ blorp_init_dynamic_states(struct blorp_context *context)
|
||||
blorp_context_upload_dynamic(context, GENX(CC_VIEWPORT), vp, 32,
|
||||
BLORP_DYNAMIC_STATE_CC_VIEWPORT) {
|
||||
vp.MinimumDepth = context->config.use_unrestricted_depth_range ?
|
||||
-FLT_MAX : 0.0;
|
||||
-FLT_MAX : 0.0f;
|
||||
vp.MaximumDepth = context->config.use_unrestricted_depth_range ?
|
||||
FLT_MAX : 1.0;
|
||||
FLT_MAX : 1.0f;
|
||||
}
|
||||
|
||||
blorp_context_upload_dynamic(context, GENX(COLOR_CALC_STATE), cc, 64,
|
||||
|
||||
@@ -1725,8 +1725,8 @@ update_viewports(struct anv_gfx_dynamic_state *hw_state,
|
||||
const bool depth_range_unrestricted =
|
||||
device->vk.enabled_extensions.EXT_depth_range_unrestricted;
|
||||
|
||||
float min_depth_limit = depth_range_unrestricted ? -FLT_MAX : 0.0;
|
||||
float max_depth_limit = depth_range_unrestricted ? FLT_MAX : 1.0;
|
||||
float min_depth_limit = depth_range_unrestricted ? -FLT_MAX : 0.0f;
|
||||
float max_depth_limit = depth_range_unrestricted ? FLT_MAX : 1.0f;
|
||||
|
||||
float min_depth = dyn->rs.depth_clamp_enable ?
|
||||
MIN2(vp->minDepth, vp->maxDepth) : min_depth_limit;
|
||||
|
||||
Reference in New Issue
Block a user