summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-09-24 15:42:46 +0200
committerChristoph Bumiller <[email protected]>2011-09-28 16:28:58 +0200
commitb3fa0d311e553ec815d58e58a30aa8b3927e4afd (patch)
tree1702e03862cfbabaed9e5b2df60019f16f58bc67 /src/gallium/drivers/nvc0
parente92348b7f5ee2565371dd779f25cc0ede8724886 (diff)
nv50,nvc0: support polygon offset clamp state
Diffstat (limited to 'src/gallium/drivers/nvc0')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_3d.xml.h2
-rw-r--r--src/gallium/drivers/nvc0/nvc0_state.c2
-rw-r--r--src/gallium/drivers/nvc0/nvc0_stateobj.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_3d.xml.h b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
index 63016372827..9264b72dadd 100644
--- a/src/gallium/drivers/nvc0/nvc0_3d.xml.h
+++ b/src/gallium/drivers/nvc0/nvc0_3d.xml.h
@@ -981,6 +981,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define NVC0_3D_INDEX_BATCH_COUNT 0x000017e0
+#define NVC0_3D_POLYGON_OFFSET_CLAMP 0x0000187c
+
#define NVC0_3D_VERTEX_ARRAY_PER_INSTANCE(i0) (0x00001880 + 0x4*(i0))
#define NVC0_3D_VERTEX_ARRAY_PER_INSTANCE__ESIZE 0x00000004
#define NVC0_3D_VERTEX_ARRAY_PER_INSTANCE__LEN 0x00000020
diff --git a/src/gallium/drivers/nvc0/nvc0_state.c b/src/gallium/drivers/nvc0/nvc0_state.c
index 9f9921cc09e..1a37d045801 100644
--- a/src/gallium/drivers/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nvc0/nvc0_state.c
@@ -266,6 +266,8 @@ nvc0_rasterizer_state_create(struct pipe_context *pipe,
SB_DATA (so, fui(cso->offset_scale));
SB_BEGIN_3D(so, POLYGON_OFFSET_UNITS, 1);
SB_DATA (so, fui(cso->offset_units * 2.0f));
+ SB_BEGIN_3D(so, POLYGON_OFFSET_CLAMP, 1);
+ SB_DATA (so, fui(cso->offset_clamp));
}
assert(so->size <= (sizeof(so->state) / sizeof(so->state[0])));
diff --git a/src/gallium/drivers/nvc0/nvc0_stateobj.h b/src/gallium/drivers/nvc0/nvc0_stateobj.h
index 0686c52fd0c..b508000bdab 100644
--- a/src/gallium/drivers/nvc0/nvc0_stateobj.h
+++ b/src/gallium/drivers/nvc0/nvc0_stateobj.h
@@ -25,7 +25,7 @@ struct nvc0_blend_stateobj {
struct nvc0_rasterizer_stateobj {
struct pipe_rasterizer_state pipe;
int size;
- uint32_t state[39];
+ uint32_t state[41];
};
struct nvc0_zsa_stateobj {