mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 16:40:13 +01:00
nv30: go back to not using viewport validate function for swtnl
The output of draw requires a null viewport transform, which the regular code is ill-equiped to do. Reinstate the original settings in the render path, and add setting of the viewport clip polygon based on fb width/height (as that is all taken care of by draw). Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
71609c9954
commit
51ca57df01
2 changed files with 16 additions and 1 deletions
|
|
@ -342,6 +342,22 @@ nv30_render_validate(struct nv30_context *nv30)
|
|||
for (; i < 16; i++)
|
||||
r->vtxfmt[i] = NV30_3D_VTXFMT_TYPE_V32_FLOAT;
|
||||
|
||||
BEGIN_NV04(push, NV30_3D(VIEWPORT_TRANSLATE_X), 8);
|
||||
PUSH_DATAf(push, 0.0);
|
||||
PUSH_DATAf(push, 0.0);
|
||||
PUSH_DATAf(push, 0.0);
|
||||
PUSH_DATAf(push, 0.0);
|
||||
PUSH_DATAf(push, 1.0);
|
||||
PUSH_DATAf(push, 1.0);
|
||||
PUSH_DATAf(push, 1.0);
|
||||
PUSH_DATAf(push, 1.0);
|
||||
BEGIN_NV04(push, NV30_3D(DEPTH_RANGE_NEAR), 2);
|
||||
PUSH_DATAf(push, 0.0);
|
||||
PUSH_DATAf(push, 1.0);
|
||||
BEGIN_NV04(push, NV30_3D(VIEWPORT_HORIZ), 2);
|
||||
PUSH_DATA (push, nv30->framebuffer.width << 16);
|
||||
PUSH_DATA (push, nv30->framebuffer.height << 16);
|
||||
|
||||
BEGIN_NV04(push, NV30_3D(VTXFMT(0)), 16);
|
||||
PUSH_DATAp(push, r->vtxfmt, 16);
|
||||
|
||||
|
|
|
|||
|
|
@ -425,7 +425,6 @@ static struct state_validate swtnl_validate_list[] = {
|
|||
{ nv30_validate_stencil_ref, NV30_NEW_STENCIL_REF },
|
||||
{ nv30_validate_stipple, NV30_NEW_STIPPLE },
|
||||
{ nv30_validate_scissor, NV30_NEW_SCISSOR | NV30_NEW_RASTERIZER },
|
||||
{ nv30_validate_viewport, NV30_NEW_VIEWPORT },
|
||||
{ nv30_fragprog_validate, NV30_NEW_FRAGPROG | NV30_NEW_FRAGCONST },
|
||||
{ nv30_validate_fragment, NV30_NEW_FRAMEBUFFER | NV30_NEW_FRAGPROG },
|
||||
{ nv30_fragtex_validate, NV30_NEW_FRAGTEX },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue