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 660816e1da158e8139c20e3ba58a9c60370ac69a..920584a59e8ba0e7aec066a886370c1bb1e0c79c 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 06260e61fef2b1fab4cb43166a79ce2e66a09328..b6087404cefaef9b4e6b42d18b58d402ebe93588 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 894def07aa8b3a46cbe7da0ceda975bac1aed30a..9a4c39f58bdbf5a1fe80a1eab7c1b8c10180efc4 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 = {