r300-gallium: Make surface_copy actually load the texture in shader.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 20 May 2009 19:22:24 +0000 (12:22 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 20 May 2009 19:22:24 +0000 (12:22 -0700)
src/gallium/drivers/r300/r300_reg.h
src/gallium/drivers/r300/r300_state_shader.h
src/gallium/drivers/r300/r300_surface.h

index 660816e..920584a 100644 (file)
@@ -3040,6 +3040,7 @@ enum {
 #   define R500_INST_RGB_WMASK_R                       (1 << 11)
 #   define R500_INST_RGB_WMASK_G                       (1 << 12)
 #   define R500_INST_RGB_WMASK_B                       (1 << 13)
+#   define R500_INST_RGB_WMASK_RGB                     (7 << 11)
 #   define R500_INST_ALPHA_WMASK                       (1 << 14)
 #   define R500_INST_RGB_OMASK_R                       (1 << 15)
 #   define R500_INST_RGB_OMASK_G                       (1 << 16)
index 06260e6..b608740 100644 (file)
@@ -181,7 +181,7 @@ static struct r500_fragment_shader r500_texture_fragment_shader = {
     .instruction_count = 2,
     .instructions[0].inst0 = R500_INST_TYPE_TEX |
         R500_INST_TEX_SEM_WAIT |
-        R500_INST_RGB_OMASK_RGB | R500_INST_ALPHA_OMASK |
+        R500_INST_RGB_WMASK_RGB | R500_INST_ALPHA_WMASK |
         R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP,
     .instructions[0].inst1 = R500_TEX_ID(0) | R500_TEX_INST_LD |
         R500_TEX_SEM_ACQUIRE | R500_TEX_IGNORE_UNCOVERED,
index 894def0..9a4c39f 100644 (file)
@@ -101,7 +101,7 @@ static struct r300_rs_block r300_rs_block_copy_state = {
         R500_RS_SEL_Q(R300_RS_SEL_K1),
     .inst[0] = R300_RS_INST_COL_CN_WRITE,
     .count = R300_IT_COUNT(2) | R300_IC_COUNT(0) | R300_HIRES_EN,
-    .inst_count = R300_RS_TX_OFFSET(6),
+    .inst_count = R300_RS_TX_OFFSET(0),
 };
 
 static struct r300_rs_block r500_rs_block_copy_state = {
@@ -111,7 +111,7 @@ static struct r300_rs_block r500_rs_block_copy_state = {
         R500_RS_SEL_Q(R500_RS_IP_PTR_K1),
     .inst[0] = R500_RS_INST_TEX_CN_WRITE,
     .count = R300_IT_COUNT(2) | R300_IC_COUNT(0) | R300_HIRES_EN,
-    .inst_count = R300_RS_TX_OFFSET(6),
+    .inst_count = R300_RS_TX_OFFSET(0),
 };
 
 static struct r300_sampler_state r300_sampler_copy_state = {