r300g: use a simpler fallback for misaligned ushort indices with triangles
[mesa.git] / src / gallium / drivers / r300 / r300_cs.h
index ea29fc565b20e28c3258a6884091ee52dc0ce756..67fb0096a8c23427b331acc337c6bd22470884a3 100644 (file)
@@ -51,7 +51,7 @@
     int cs_count = 0; (void) cs_count; (void) cs_winsys;
 
 #define BEGIN_CS(size) do { \
-    assert(size <= (cs_copy->ndw - cs_copy->cdw)); \
+    assert(size <= (R300_MAX_CMDBUF_DWORDS - cs_copy->cdw)); \
     CS_DEBUG(cs_count = size;) \
 } while (0)
 
@@ -72,7 +72,7 @@
  */
 
 #define OUT_CS(value) do { \
-    cs_copy->ptr[cs_copy->cdw++] = (value); \
+    cs_copy->buf[cs_copy->cdw++] = (value); \
     CS_DEBUG(cs_count--;) \
 } while (0)
 
@@ -96,7 +96,7 @@
     OUT_CS(CP_PACKET3(op, count))
 
 #define OUT_CS_TABLE(values, count) do { \
-    memcpy(cs_copy->ptr + cs_copy->cdw, values, count * 4); \
+    memcpy(cs_copy->buf + cs_copy->cdw, values, count * 4); \
     cs_copy->cdw += count; \
     CS_DEBUG(cs_count -= count;) \
 } while (0)
 
 #define WRITE_CS_TABLE(values, count) do { \
     CS_DEBUG(assert(cs_count == 0);) \
-    memcpy(cs_copy->ptr + cs_copy->cdw, (values), (count) * 4); \
+    memcpy(cs_copy->buf + cs_copy->cdw, (values), (count) * 4); \
     cs_copy->cdw += (count); \
 } while (0)