Mesa (staging/19.1): radv: disable viewport clamping even if FS doesn't write Z
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 21 07:41:46 UTC 2019
Module: Mesa
Branch: staging/19.1
Commit: 14d7fc09cc2b5d973853819588398b267d1ee682
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=14d7fc09cc2b5d973853819588398b267d1ee682
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Tue Jun 18 18:58:40 2019 +0200
radv: disable viewport clamping even if FS doesn't write Z
This fixes new CTS dEQP-VK.pipeline.depth_range_unrestricted.*.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
(cherry picked from commit 0a313cc285c2939de9cac07f045b0b699bc208ca)
---
src/amd/vulkan/radv_pipeline.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 13894e653d2..f80948b53bc 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -2711,7 +2711,6 @@ radv_pipeline_generate_depth_stencil_state(struct radeon_cmdbuf *ctx_cs,
const VkPipelineDepthStencilStateCreateInfo *vkds = pCreateInfo->pDepthStencilState;
RADV_FROM_HANDLE(radv_render_pass, pass, pCreateInfo->renderPass);
struct radv_subpass *subpass = pass->subpasses + pCreateInfo->subpass;
- struct radv_shader_variant *ps = pipeline->shaders[MESA_SHADER_FRAGMENT];
struct radv_render_pass_attachment *attachment = NULL;
uint32_t db_depth_control = 0, db_stencil_control = 0;
uint32_t db_render_control = 0, db_render_override2 = 0;
@@ -2760,8 +2759,7 @@ radv_pipeline_generate_depth_stencil_state(struct radeon_cmdbuf *ctx_cs,
db_render_override |= S_02800C_FORCE_HIS_ENABLE0(V_02800C_FORCE_DISABLE) |
S_02800C_FORCE_HIS_ENABLE1(V_02800C_FORCE_DISABLE);
- if (!pCreateInfo->pRasterizationState->depthClampEnable &&
- ps->info.info.ps.writes_z) {
+ if (!pCreateInfo->pRasterizationState->depthClampEnable) {
/* From VK_EXT_depth_range_unrestricted spec:
*
* "The behavior described in Primitive Clipping still applies.
More information about the mesa-commit
mailing list