#define NVC0_3D_VIEWPORT_TRANSLATE_Z__ESIZE 0x00000020
#define NVC0_3D_VIEWPORT_TRANSLATE_Z__LEN 0x00000010
+#define NVC0_3D_VIEWPORT_SWIZZLE(i0) (0x00000a18 + 0x20*(i0))
+#define NVC0_3D_VIEWPORT_SWIZZLE__ESIZE 0x00000020
+#define NVC0_3D_VIEWPORT_SWIZZLE__LEN 0x00000010
+
#define NVC0_3D_SUBPIXEL_PRECISION(i0) (0x00000a1c + 0x20*(i0))
#define NVC0_3D_SUBPIXEL_PRECISION__ESIZE 0x00000020
#define NVC0_3D_SUBPIXEL_PRECISION__LEN 0x00000010
case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
case PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE:
case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
+ case PIPE_CAP_VIEWPORT_SWIZZLE:
return class_3d >= GM200_3D_CLASS;
case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
return class_3d >= GP100_3D_CLASS;
nvc0_validate_viewport(struct nvc0_context *nvc0)
{
struct nouveau_pushbuf *push = nvc0->base.pushbuf;
+ uint16_t class_3d = nvc0->screen->base.class_3d;
int x, y, w, h, i;
float zmin, zmax;
BEGIN_NVC0(push, NVC0_3D(DEPTH_RANGE_NEAR(i)), 2);
PUSH_DATAf(push, zmin);
PUSH_DATAf(push, zmax);
+
+ if (class_3d >= GM200_3D_CLASS) {
+ BEGIN_NVC0(push, NVC0_3D(VIEWPORT_SWIZZLE(i)), 1);
+ PUSH_DATA (push, vp->swizzle_x << 0 |
+ vp->swizzle_y << 4 |
+ vp->swizzle_z << 8 |
+ vp->swizzle_w << 12);
+ }
}
nvc0->viewports_dirty = 0;
}