summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/r300/r300_fixed_pipelines.h10
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c35
2 files changed, 38 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_fixed_pipelines.h b/src/mesa/drivers/dri/r300/r300_fixed_pipelines.h
index 4e1fc5c5559..1dcb402b9d8 100644
--- a/src/mesa/drivers/dri/r300/r300_fixed_pipelines.h
+++ b/src/mesa/drivers/dri/r300/r300_fixed_pipelines.h
@@ -234,9 +234,15 @@ static struct r300_pixel_shader_state SINGLE_TEXTURE_PIXEL_SHADER={
inst: { 0x00018000 }
},
alu: {
- length: 1,
+ length: 2,
inst:
- {
+ {
+/* I get misc problems without this after doing cold-reboot.
+ This would imply that alu programming is buggy. --aet */
+#if 1
+ PFS_NOP,
+#endif
+
/* What are 0's ORed with flags ? They are register numbers that
just happen to be 0 */
{
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 7092842e9d6..97785577819 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -223,14 +223,14 @@ static void r300_render_immediate_primitive(r300ContextPtr rmesa,
WARN_ONCE("Aeiee ! aos_count==0, while it shouldn't. Skipping rendering\n");
return;
}
-
+
render_inputs = rmesa->state.render_inputs;
if(!render_inputs){
WARN_ONCE("Aeiee ! render_inputs==0. Skipping rendering.\n");
return;
}
-
+
start_immediate_packet(end-start, type, 4*rmesa->state.aos_count);
for(i=start;i<end;i++){
@@ -390,6 +390,7 @@ static void upload_vertex_buffer(r300ContextPtr rmesa, GLcontext *ctx)
int idx=0;
int i,j,k;
radeonScreenPtr rsp=rmesa->radeon.radeonScreen;
+ GLuint render_inputs;
/* A hack - we don't want to overwrite vertex buffers, so we
just use AGP space for them.. Fix me ! */
@@ -422,13 +423,37 @@ static void upload_vertex_buffer(r300ContextPtr rmesa, GLcontext *ctx)
offset+=v->size*4*VB->Count; \
idx++; \
}
+
+ render_inputs = rmesa->state.render_inputs;
- UPLOAD_VECTOR(VB->ObjPtr);
- UPLOAD_VECTOR(VB->ColorPtr[0]);
+ if(!render_inputs){
+ WARN_ONCE("Aeiee ! render_inputs==0. Skipping rendering.\n");
+ return;
+ }
+ /* coordinates */
+ if(render_inputs & _TNL_BIT_POS)
+ UPLOAD_VECTOR(VB->ObjPtr);
+ if(render_inputs & _TNL_BIT_NORMAL)
+ UPLOAD_VECTOR(VB->NormalPtr);
+
+ /* color components */
+ if(render_inputs & _TNL_BIT_COLOR0)
+ UPLOAD_VECTOR(VB->ColorPtr[0]);
+ if(render_inputs & _TNL_BIT_COLOR1)
+ UPLOAD_VECTOR(VB->SecondaryColorPtr[0]);
+
+ if(render_inputs & _TNL_BIT_FOG)
+ UPLOAD_VECTOR(VB->FogCoordPtr);
+
/* texture coordinates */
for(k=0;k < ctx->Const.MaxTextureUnits;k++)
- if(ctx->Texture.Unit[k].Enabled)
+ if(render_inputs & (_TNL_BIT_TEX0<<k))
UPLOAD_VECTOR(VB->TexCoordPtr[k]);
+
+ if(render_inputs & _TNL_BIT_INDEX)
+ UPLOAD_VECTOR(VB->IndexPtr[0]);
+ if(render_inputs & _TNL_BIT_POINTSIZE)
+ UPLOAD_VECTOR(VB->PointSizePtr);
if(idx>=R300_MAX_AOS_ARRAYS){
fprintf(stderr, "Aieee ! Maximum AOS arrays count exceeded.. \n");