summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h2
-rw-r--r--src/mesa/drivers/dri/r300/r300_maos.c20
2 files changed, 19 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index da253ba670..afdfc29e43 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -52,7 +52,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* directly, see i965 driver for example.
*/
/* #define RADEON_VTXFMT_A */
+#ifdef RADEON_VTXFMT_A
#define HW_VBOS
+#endif
/* We don't handle 16 bits elts swapping yet */
#ifdef MESA_BIG_ENDIAN
diff --git a/src/mesa/drivers/dri/r300/r300_maos.c b/src/mesa/drivers/dri/r300/r300_maos.c
index b2ce6cb991..8de464bcd8 100644
--- a/src/mesa/drivers/dri/r300/r300_maos.c
+++ b/src/mesa/drivers/dri/r300/r300_maos.c
@@ -400,6 +400,7 @@ int r300EmitArrays(GLcontext *ctx)
GLuint i;
GLuint InputsRead = 0, OutputsWritten = 0;
int *inputs = NULL;
+ int vir_inputs[VERT_ATTRIB_MAX];
GLint tab[VERT_ATTRIB_MAX];
int swizzle[VERT_ATTRIB_MAX][4];
@@ -442,9 +443,22 @@ int r300EmitArrays(GLcontext *ctx)
inputs[i] = -1;
if(!(r300->radeon.radeonScreen->chip_flags & RADEON_CHIPSET_TCL)) {
- for (i = 0; i < VERT_ATTRIB_MAX; i++)
- if (inputs[i] > 0)
- inputs[i]++;
+ /* Fixed, apply to vir0 only */
+ memcpy(vir_inputs, inputs, VERT_ATTRIB_MAX * sizeof(int));
+ inputs = vir_inputs;
+
+ if (InputsRead & VERT_ATTRIB_POS)
+ inputs[VERT_ATTRIB_POS] = 0;
+
+ if (InputsRead & (1 << VERT_ATTRIB_COLOR0))
+ inputs[VERT_ATTRIB_COLOR0] = 2;
+
+ if (InputsRead & (1 << VERT_ATTRIB_COLOR1))
+ inputs[VERT_ATTRIB_COLOR0] = 3;
+
+ for (i = VERT_ATTRIB_TEX0; i <= VERT_ATTRIB_TEX7; i++)
+ if (InputsRead & (1 << i))
+ inputs[i] = 6 + (i - VERT_ATTRIB_TEX0);
}
RENDERINPUTS_COPY( rmesa->state.render_inputs_bitset, inputs_bitset );