radeon: fix max indx/vertex emission due to state checker
authorDave Airlie <airlied@itt42.(none)>
Fri, 24 Jul 2009 01:46:20 +0000 (11:46 +1000)
committerDave Airlie <airlied@itt42.(none)>
Thu, 27 Aug 2009 04:50:42 +0000 (14:50 +1000)
src/mesa/drivers/dri/radeon/radeon_common_context.h
src/mesa/drivers/dri/radeon/radeon_ioctl.c

index 5c4b4abaca42601553ed4fe212c93e35093ace3d..07a0c4c05544ac9be1797b1050c0455f269610d4 100644 (file)
@@ -355,7 +355,8 @@ struct radeon_tcl_info {
 
 struct radeon_ioctl {
        GLuint vertex_offset;
-        struct radeon_bo *bo;
+       GLuint vertex_max;
+       struct radeon_bo *bo;
        GLuint vertex_size;
 };
 
index afdb5e723e67a503830e5cba847f0c7f4a96ac46..1bda9cbe09c666cb73933a70a2129c30d82cd862 100644 (file)
@@ -273,7 +273,7 @@ GLushort *radeonAllocEltsOpenEnded( r100ContextPtr rmesa,
    } else {
      OUT_BATCH(rmesa->ioctl.vertex_offset);
    }
-   OUT_BATCH(0xffff);
+   OUT_BATCH(rmesa->ioctl.vertex_max);
    OUT_BATCH(vertex_format);
    OUT_BATCH(primitive |
             RADEON_CP_VC_CNTL_PRIM_WALK_IND |
@@ -342,6 +342,7 @@ void radeonEmitAOS( r100ContextPtr rmesa,
    rmesa->ioctl.bo = rmesa->radeon.tcl.aos[0].bo;
    rmesa->ioctl.vertex_offset =
      (rmesa->radeon.tcl.aos[0].offset + offset * rmesa->radeon.tcl.aos[0].stride * 4);
+   rmesa->ioctl.vertex_max = rmesa->radeon.tcl.aos[0].count;
 #else
    BATCH_LOCALS(&rmesa->radeon);
    uint32_t voffset;