.clip_miny = -INFINITY,
.clip_maxx = INFINITY,
.clip_maxy = INFINITY,
-
- .clip_minz = 0.0,
- .clip_maxz = 1.0,
};
/* Always scissor to the viewport by default. */
float vp_miny = (int) (vp->translate[1] - fabsf(vp->scale[1]));
float vp_maxy = (int) (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]));
+
/* Apply the scissor test */
unsigned minx, miny, maxx, maxy;
maxx = temp;
}
+ if (minz > maxz) {
+ float temp = minz;
+ minz = maxz;
+ maxz = temp;
+ }
+
/* Clamp to the framebuffer size as a last check */
minx = MIN2(ctx->pipe_framebuffer.width, minx);
view.viewport0[1] = miny;
view.viewport1[1] = MALI_POSITIVE(maxy);
+ view.clip_minz = minz;
+ view.clip_maxz = maxz;
+
ctx->payloads[PIPE_SHADER_FRAGMENT].postfix.viewport =
panfrost_upload_transient(ctx,
&view,