r500: bump state atom size up for fp and fp constants
authorDave Airlie <airlied@redhat.com>
Thu, 22 May 2008 07:09:30 +0000 (17:09 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 22 May 2008 07:09:58 +0000 (17:09 +1000)
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_context.h

index 995bfee42a31bf1f66461a6484921d21b375d19b..fc1b95b0ef219dd8829b9a5be43be4befce7fd76 100644 (file)
@@ -432,9 +432,9 @@ void r300InitCmdBuf(r300ContextPtr r300)
                r300->hw.fp.cmd[R500_FP_CMD_2] = cmdpacket0(R500_US_FC_CTRL, 1);
                r300->hw.fp.cmd[R500_FP_FC_CNTL] = 0; /* FIXME when we add flow control */
 
-               ALLOC_STATE(r500fp, r500fp, R300_FPI_CMDSIZE, 0);
+               ALLOC_STATE(r500fp, r500fp, R500_FPI_CMDSIZE, 0);
                r300->hw.r500fp.cmd[R300_FPI_CMD_0] = cmdr500fp(0, 0, 0, 0);
-               ALLOC_STATE(r500fp_const, r500fp_const, R300_FPP_CMDSIZE, 0);
+               ALLOC_STATE(r500fp_const, r500fp_const, R500_FPP_CMDSIZE, 0);
                r300->hw.r500fp_const.cmd[R300_FPI_CMD_0] = cmdr500fp(0, 0, 1, 0);
        } else {
                ALLOC_STATE(fp, always, R300_FP_CMDSIZE, 0);
index 06b81e6e63673d775dacf68e9db94cd9afa8c13a..eba93e4bfb2d2e40ff4b58ba5d1a62fbaa0ce48b 100644 (file)
@@ -372,10 +372,14 @@ struct r300_state_atom {
 #define R300_FPI_CMD_0         0
 #define R300_FPI_INSTR_0       1
 #define R300_FPI_CMDSIZE       65
+/* R500 has space for 512 instructions - 6 dwords per instruction */
+#define R500_FPI_CMDSIZE       (512*6+1)
 
 #define R300_FPP_CMD_0         0
 #define R300_FPP_PARAM_0       1
 #define R300_FPP_CMDSIZE       (32*4+1)
+/* R500 has spcae for 256 constants - 4 dwords per constant */
+#define R500_FPP_CMDSIZE       (256*4+1)
 
 #define R300_FOGS_CMD_0                0
 #define R300_FOGS_STATE                1