Mesa (master): r300-gallium: Fix build errors.

Corbin Simpson csimpson at kemper.freedesktop.org
Fri Feb 13 04:36:14 UTC 2009


Module: Mesa
Branch: master
Commit: 1d2c31df41d2a52b306fd65bbb6c800e993a2798
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d2c31df41d2a52b306fd65bbb6c800e993a2798

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Thu Feb 12 20:35:17 2009 -0800

r300-gallium: Fix build errors.

---

 src/gallium/drivers/r300/r300_emit.c         |   18 +++++++++---------
 src/gallium/drivers/r300/r300_state_shader.h |   16 ++++++++--------
 src/gallium/drivers/r300/r300_surface.c      |    2 +-
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index a4d520a..a3b2772 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -115,7 +115,7 @@ void r500_emit_fragment_shader(struct r300_context* r300,
 {
     CS_LOCALS(r300);
     int i = 0;
-    BEGIN_CS(11 + (shader->shader.instruction_count * 6));
+    BEGIN_CS(11 + (fs->instruction_count * 6));
     OUT_CS_REG(R500_US_CONFIG, R500_ZERO_TIMES_ANYTHING_EQUALS_ZERO);
     OUT_CS_REG(R500_US_PIXSIZE, fs->shader.stack_size);
     OUT_CS_REG(R500_US_CODE_ADDR, R500_US_CODE_START_ADDR(0) |
@@ -123,14 +123,14 @@ void r500_emit_fragment_shader(struct r300_context* r300,
 
     OUT_CS_REG(R500_GA_US_VECTOR_INDEX, R500_GA_US_VECTOR_INDEX_TYPE_INSTR);
     OUT_CS_ONE_REG(R500_GA_US_VECTOR_DATA,
-        shader->shader.instruction_count * 6);
-    for (i = 0; i < shader->shader.instruction_count; i++) {
-        OUT_CS(shader->instructions[i].inst0);
-        OUT_CS(shader->instructions[i].inst1);
-        OUT_CS(shader->instructions[i].inst2);
-        OUT_CS(shader->instructions[i].inst3);
-        OUT_CS(shader->instructions[i].inst4);
-        OUT_CS(shader->instructions[i].inst5);
+        fs->instruction_count * 6);
+    for (i = 0; i < fs->instruction_count; i++) {
+        OUT_CS(fs->instructions[i].inst0);
+        OUT_CS(fs->instructions[i].inst1);
+        OUT_CS(fs->instructions[i].inst2);
+        OUT_CS(fs->instructions[i].inst3);
+        OUT_CS(fs->instructions[i].inst4);
+        OUT_CS(fs->instructions[i].inst5);
     }
     R300_PACIFY;
     END_CS;
diff --git a/src/gallium/drivers/r300/r300_state_shader.h b/src/gallium/drivers/r300/r300_state_shader.h
index 8e9ed5d..a5f03b9 100644
--- a/src/gallium/drivers/r300/r300_state_shader.h
+++ b/src/gallium/drivers/r300/r300_state_shader.h
@@ -47,16 +47,16 @@ static const struct r300_fragment_shader r300_passthrough_fragment_shader = {
     OUT_CS(R300_US_OUT_FMT_UNUSED);
     OUT_CS(R300_US_OUT_FMT_UNUSED);
     OUT_CS_REG(R300_US_W_FMT, R300_W_FMT_W0); */
-    .alu_instruction_count = 1;
-    .tex_instruction_count = 0;
-    .indirections = 1;
-    .shader.stack_size = 2;
+    .alu_instruction_count = 1,
+    .tex_instruction_count = 0,
+    .indirections = 1,
+    .shader.stack_size = 2,
 
     /* XXX decode these */
-    .instructions[0].alu_rgb_inst = 0x50A80;
-    .instructions[0].alu_rgb_inst = 0x1C000000;
-    .instructions[0].alu_alpha_inst = 0x40889;
-    .instructions[0].alu_alpha_inst = 0x1000000;
+    .instructions[0].alu_rgb_inst = 0x50A80,
+    .instructions[0].alu_rgb_inst = 0x1C000000,
+    .instructions[0].alu_alpha_inst = 0x40889,
+    .instructions[0].alu_alpha_inst = 0x1000000,
 };
 
 static const struct r500_fragment_shader r500_passthrough_fragment_shader = {
diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c
index 2c6af36..7a41145 100644
--- a/src/gallium/drivers/r300/r300_surface.c
+++ b/src/gallium/drivers/r300/r300_surface.c
@@ -234,7 +234,7 @@ static void r300_surface_fill(struct pipe_context* pipe,
     } else {
         r300_emit_fragment_shader(r300, &r300_passthrough_fragment_shader);
     }
-    
+
     BEGIN_CS(2 + (caps->has_tcl ? 23 : 2));
     /* XXX these magic numbers should be explained when
      * this becomes a cached state object */




More information about the mesa-commit mailing list