st/nine: Fix sm3 relative addressing for non-debug build
authorAxel Davy <axel.davy@ens.fr>
Sun, 7 Dec 2014 12:42:41 +0000 (13:42 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 22 Jan 2015 22:16:23 +0000 (22:16 +0000)
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@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/nine_state.c

index f788a3dae78efab2b31392718c8187ee1a251894..b05e67ecd018f5ef9d17cb3d4b4eef1708b3c77b 100644 (file)
@@ -495,7 +495,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;
@@ -513,14 +512,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;