mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
nvc0: add NV_viewport_swizzle support for GM200+
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519>
This commit is contained in:
parent
90fcb3fef2
commit
5e6267b20b
3 changed files with 14 additions and 0 deletions
|
|
@ -447,6 +447,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#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
|
||||
|
|
|
|||
|
|
@ -313,6 +313,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -391,6 +391,7 @@ static void
|
|||
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;
|
||||
|
||||
|
|
@ -431,6 +432,14 @@ nvc0_validate_viewport(struct nvc0_context *nvc0)
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue