[Mesa-dev] [PATCH 47/53] st/nine: Fix sm3 relative addressing for non-debug build

Axel Davy axel.davy at ens.fr
Wed Jan 7 08:36:57 PST 2015


Relative addressing needs the constant buffer to get all
the correct constants, even those defined by the shader.

The code to copy the shader constants to the constant buffer
was enabled only for debug build. Enable it always.

Cc: "10.4" <mesa-stable at lists.freedesktop.org>
Reviewed-by: David Heidelberg <david at ixit.cz>
Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 src/gallium/state_trackers/nine/nine_state.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index 870b1b0..0137a78 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -496,7 +496,6 @@ update_vs_constants_userbuf(struct NineDevice9 *device)
         state->changed.vs_const_b = 0;
     }
 
-#ifdef DEBUG
     if (device->state.vs->lconstf.ranges) {
         /* TODO: Can we make it so that we don't have to copy everything ? */
         const struct nine_lconstf *lconstf =  &device->state.vs->lconstf;
@@ -514,14 +513,11 @@ update_vs_constants_userbuf(struct NineDevice9 *device)
         }
         cb.user_buffer = dst;
     }
-#endif
 
     pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, &cb);
 
-#ifdef DEBUG
     if (device->state.vs->lconstf.ranges)
         FREE((void *)cb.user_buffer);
-#endif
 
     if (device->state.changed.vs_const_f) {
         struct nine_range *r = device->state.changed.vs_const_f;
-- 
2.1.3



More information about the mesa-dev mailing list