nv50,nvc0: support polygon offset clamp state
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 24 Sep 2011 13:42:46 +0000 (15:42 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Wed, 28 Sep 2011 14:28:58 +0000 (16:28 +0200)
src/gallium/drivers/nv50/nv50_3d.xml.h
src/gallium/drivers/nv50/nv50_state.c
src/gallium/drivers/nv50/nv50_stateobj.h
src/gallium/drivers/nvc0/nvc0_3d.xml.h
src/gallium/drivers/nvc0/nvc0_state.c
src/gallium/drivers/nvc0/nvc0_stateobj.h

index 1bde07fa3afeeb695703b44af737373c90ddda96..0f5a77de9a18d3071bbb753e9527a4cfddfd9580 100644 (file)
@@ -1658,7 +1658,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define NV50_3D_GP_RESULT_MAP_3__MASK                          0xff000000
 #define NV50_3D_GP_RESULT_MAP_3__SHIFT                         24
 
-#define NV50_3D_UNK187C                                                0x0000187c
+#define NV50_3D_POLYGON_OFFSET_CLAMP                           0x0000187c
 
 #define NVA3_3D_VERTEX_ARRAY_PER_INSTANCE_ALT(i0)             (0x00001880 + 0x4*(i0))
 #define NVA3_3D_VERTEX_ARRAY_PER_INSTANCE_ALT__ESIZE           0x00000004
index 0e08b096f5876a03f3c323ee4f142e59fa8bc25b..ede8713ae76e99f4912b6ebfff301b9f80487d38 100644 (file)
@@ -308,6 +308,8 @@ nv50_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])));
index d367a064d614fbc7fb4053109ccd7273e2e9330c..83a08b0bd3de0095bfe711ca9a2848db0a6a8c77 100644 (file)
@@ -27,7 +27,7 @@ struct nv50_blend_stateobj {
 struct nv50_rasterizer_stateobj {
    struct pipe_rasterizer_state pipe;
    int size;
-   uint32_t state[44];
+   uint32_t state[46];
 };
 
 struct nv50_zsa_stateobj {
index 630163728278bac4c57cad5a95e08868c7a04d89..9264b72dadd8906eb2e81afc99a405fe657b7795 100644 (file)
@@ -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
index 9f9921cc09e172c2ce232ef6a4b972141b204ad4..1a37d045801a0b8b40432c9067cd4839fc40d197 100644 (file)
@@ -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])));
index 0686c52fd0cabd3dd393f527490db22c423f03e2..b508000bdabd02ccfe63638495e855acf4cc6b37 100644 (file)
@@ -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 {