summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga/include/svga3d_shaderdefs.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2014-02-08 09:51:13 -0800
committerBrian Paul <brianp@vmware.com>2014-02-14 08:21:43 -0700
commit2e0c90847f16a9cf2a40436beacb65c65535fa4a (patch)
tree23574e73ed4cc289a6a63bdd5c586c1ac4201c76 /src/gallium/drivers/svga/include/svga3d_shaderdefs.h
parent6d1cecbfd7d4268e0e4e088af77d637d2bdcc541 (diff)
svga: split / update svga3d header files
The old svga3d_reg.h file is split into separate header files and we add new items for guest-backed surfaces. Plus some minor code fixes because of renamed symbols. Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/gallium/drivers/svga/include/svga3d_shaderdefs.h')
-rw-r--r--src/gallium/drivers/svga/include/svga3d_shaderdefs.h37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/gallium/drivers/svga/include/svga3d_shaderdefs.h b/src/gallium/drivers/svga/include/svga3d_shaderdefs.h
index 2078c4a8a44..355edfdb702 100644
--- a/src/gallium/drivers/svga/include/svga3d_shaderdefs.h
+++ b/src/gallium/drivers/svga/include/svga3d_shaderdefs.h
@@ -1,5 +1,5 @@
/**********************************************************
- * Copyright 2007-2009 VMware, Inc. All rights reserved.
+ * Copyright 2007-2014 VMware, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -78,6 +78,7 @@ typedef struct {
#define SVGA3D_VS_10 ((SVGA3D_VS_TYPE << 16) | 1 << 8)
#define SVGA3D_VS_11 (SVGA3D_VS_10 | 1)
#define SVGA3D_VS_20 ((SVGA3D_VS_TYPE << 16) | 2 << 8)
+#define SVGA3D_VS_21 (SVGA3D_VS_20 | 1)
#define SVGA3D_VS_30 ((SVGA3D_VS_TYPE << 16) | 3 << 8)
#define SVGA3D_PS_10 ((SVGA3D_PS_TYPE << 16) | 1 << 8)
@@ -86,6 +87,7 @@ typedef struct {
#define SVGA3D_PS_13 (SVGA3D_PS_10 | 3)
#define SVGA3D_PS_14 (SVGA3D_PS_10 | 4)
#define SVGA3D_PS_20 ((SVGA3D_PS_TYPE << 16) | 2 << 8)
+#define SVGA3D_PS_21 (SVGA3D_PS_20 | 1)
#define SVGA3D_PS_30 ((SVGA3D_PS_TYPE << 16) | 3 << 8)
/* The *_ENABLED are for backwards compatibility with old drivers */
@@ -268,28 +270,13 @@ typedef enum {
typedef enum {
SVGA3DSAMP_UNKNOWN = 0, /* Uninitialized value */
- SVGA3DSAMP_2D = 2, /* dcl_2d s# (for declaring a 2-D texture) */
+ SVGA3DSAMP_2D = 2, /* dcl_2d s# (for declaring a 2D texture) */
SVGA3DSAMP_CUBE, /* dcl_cube s# (for declaring a cube texture) */
SVGA3DSAMP_VOLUME, /* dcl_volume s# (for declaring a volume texture) */
+ SVGA3DSAMP_2D_SHADOW, /* dcl_2d s# (for declaring a 2D shadow texture) */
+ SVGA3DSAMP_MAX,
} SVGA3dShaderSamplerType;
-/* SVGA3D sampler format classes */
-
-typedef enum {
- SVGA3DSAMPFORMAT_ARGB, /* ARGB formats */
- SVGA3DSAMPFORMAT_V8U8, /* Sign and normalize (SNORM) V & U */
- SVGA3DSAMPFORMAT_Q8W8V8U8, /* SNORM all */
- SVGA3DSAMPFORMAT_CxV8U8, /* SNORM V & U, C=SQRT(1-U^2-V^2) */
- SVGA3DSAMPFORMAT_X8L8V8U8, /* SNORM V & U */
- SVGA3DSAMPFORMAT_A2W10V10U10, /* SNORM W, V & U */
- SVGA3DSAMPFORMAT_DXT_PMA, /* DXT pre-multiplied alpha */
- SVGA3DSAMPFORMAT_YUV, /* YUV video format */
- SVGA3DSAMPFORMAT_UYVY, /* UYVY video format */
- SVGA3DSAMPFORMAT_Rx, /* R16F/32F */
- SVGA3DSAMPFORMAT_RxGx, /* R16FG16F, R32FG32F */
- SVGA3DSAMPFORMAT_V16U16, /* SNORM all */
-} SVGA3DShaderSamplerFormatClass;
-
/* SVGA3D write mask */
#define SVGA3DWRITEMASK_0 1 /* Component 0 (X;Red) */
@@ -315,6 +302,18 @@ typedef enum {
#define SVGA3DDSTMOD_MSAMPCENTROID 4
+/* SVGA3D destination shift scale */
+
+typedef enum {
+ SVGA3DDSTSHFSCALE_X1 = 0, /* 1.0 */
+ SVGA3DDSTSHFSCALE_X2 = 1, /* 2.0 */
+ SVGA3DDSTSHFSCALE_X4 = 2, /* 4.0 */
+ SVGA3DDSTSHFSCALE_X8 = 3, /* 8.0 */
+ SVGA3DDSTSHFSCALE_D8 = 13, /* 0.125 */
+ SVGA3DDSTSHFSCALE_D4 = 14, /* 0.25 */
+ SVGA3DDSTSHFSCALE_D2 = 15 /* 0.5 */
+} SVGA3dShaderDstShfScaleType;
+
/* SVGA3D source swizzle */
#define SVGA3DSWIZZLE_REPLICATEX 0x00