mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-20 08:00:28 +01:00
gallium: use identity viewport fix broken clear_with_quad() path
Since bypass_clipping is set and we're specifying quad vertexes in window coords, setup identity viewport.
This commit is contained in:
parent
0bc2e2c9cd
commit
4f67a3f7d3
1 changed files with 5 additions and 7 deletions
|
|
@ -271,17 +271,15 @@ clear_with_quad(GLcontext *ctx,
|
|||
#endif
|
||||
|
||||
#if !TEST_DRAW_PASSTHROUGH
|
||||
/* viewport state: viewport matching window dims */
|
||||
/* viewport state: identity since we're drawing in window coords */
|
||||
{
|
||||
const float width = ctx->DrawBuffer->Width;
|
||||
const float height = ctx->DrawBuffer->Height;
|
||||
struct pipe_viewport_state vp;
|
||||
vp.scale[0] = 0.5 * width;
|
||||
vp.scale[1] = -0.5 * height;
|
||||
vp.scale[0] = 1.0;
|
||||
vp.scale[1] = 1.0;
|
||||
vp.scale[2] = 1.0;
|
||||
vp.scale[3] = 1.0;
|
||||
vp.translate[0] = 0.5 * width;
|
||||
vp.translate[1] = 0.5 * height;
|
||||
vp.translate[0] = 0.0;
|
||||
vp.translate[1] = 0.0;
|
||||
vp.translate[2] = 0.0;
|
||||
vp.translate[3] = 0.0;
|
||||
cso_set_viewport(st->cso_context, &vp);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue