diff --git a/docs/features.txt b/docs/features.txt index 40ebfd68028..d5233eb5010 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -213,7 +213,7 @@ GL 4.4, GLSL 4.40 -- all DONE: freedreno/a6xx, i965/gen8+, nvc0, r600, radeonsi, GL 4.5, GLSL 4.50 -- all DONE: freedreno/a6xx, nvc0, r600, radeonsi, llvmpipe, zink GL_ARB_ES3_1_compatibility DONE (freedreno/a6xx, i965/hsw+, softpipe, virgl) - GL_ARB_clip_control DONE (freedreno, i965, nv50, softpipe, virgl, lima, d3d12) + GL_ARB_clip_control DONE (freedreno, i965, nv50, softpipe, virgl, lima, d3d12, panfrost) GL_ARB_conditional_render_inverted DONE (freedreno, i965, nv50, softpipe, virgl, panfrost, d3d12) GL_ARB_cull_distance DONE (freedreno/a6xx, i965, nv50, softpipe, virgl) GL_ARB_derivative_control DONE (freedreno/a3xx+, i965, nv50, softpipe, virgl) diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index eda56974409..ba0e5b2361b 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -29,6 +29,7 @@ #include "util/u_helpers.h" #include "util/u_draw.h" #include "util/u_memory.h" +#include "util/u_viewport.h" #include "pipe/p_defines.h" #include "pipe/p_state.h" #include "gallium/auxiliary/util/u_blend.h" @@ -749,8 +750,9 @@ panfrost_emit_viewport(struct panfrost_batch *batch) float vp_maxx = vp->translate[0] + fabsf(vp->scale[0]); float vp_miny = vp->translate[1] - fabsf(vp->scale[1]); float vp_maxy = vp->translate[1] + fabsf(vp->scale[1]); - float minz = (vp->translate[2] - fabsf(vp->scale[2])); - float maxz = (vp->translate[2] + fabsf(vp->scale[2])); + + float minz, maxz; + util_viewport_zmin_zmax(vp, rast->clip_halfz, &minz, &maxz); /* Scissor to the intersection of viewport and to the scissor, clamped * to the framebuffer */ diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index ee6dbb7b57f..29ba7016b98 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -152,6 +152,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param) return true; case PIPE_CAP_SAMPLER_VIEW_TARGET: + case PIPE_CAP_CLIP_HALFZ: case PIPE_CAP_TEXTURE_SWIZZLE: case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE: case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR: