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

Author: Marek Olšák <marek.ol...@amd.com>
Date:   Fri Dec  2 03:39:04 2016 +0100

radeonsi: properly declare context sampler states

Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com>

---

 src/gallium/drivers/radeonsi/si_blit.c        | 2 +-
 src/gallium/drivers/radeonsi/si_descriptors.c | 4 ++--
 src/gallium/drivers/radeonsi/si_state.h       | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_blit.c 
b/src/gallium/drivers/radeonsi/si_blit.c
index f5f49c1..83870e5 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -78,7 +78,7 @@ static void si_blitter_begin(struct pipe_context *ctx, enum 
si_blitter_op op)
        if (op & SI_SAVE_TEXTURES) {
                util_blitter_save_fragment_sampler_states(
                        sctx->blitter, 2,
-                       
sctx->samplers[PIPE_SHADER_FRAGMENT].views.sampler_states);
+                       
(void**)sctx->samplers[PIPE_SHADER_FRAGMENT].views.sampler_states);
 
                util_blitter_save_fragment_sampler_views(sctx->blitter, 2,
                        sctx->samplers[PIPE_SHADER_FRAGMENT].views.views);
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c 
b/src/gallium/drivers/radeonsi/si_descriptors.c
index cf66102..8b6e0bb 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -456,7 +456,7 @@ static void si_set_sampler_view(struct si_context *sctx,
 
                        if (views->sampler_states[slot])
                                memcpy(desc + 12,
-                                      views->sampler_states[slot], 4*4);
+                                      views->sampler_states[slot]->val, 4*4);
                }
 
                views->enabled_mask |= 1u << slot;
@@ -474,7 +474,7 @@ static void si_set_sampler_view(struct si_context *sctx,
                /* Re-set the sampler state if we are transitioning from FMASK. 
*/
                if (views->sampler_states[slot])
                        memcpy(desc + 12,
-                              views->sampler_states[slot], 4*4);
+                              views->sampler_states[slot]->val, 4*4);
 
                views->enabled_mask &= ~(1u << slot);
        }
diff --git a/src/gallium/drivers/radeonsi/si_state.h 
b/src/gallium/drivers/radeonsi/si_state.h
index 3a9f0cf..eb7a69f 100644
--- a/src/gallium/drivers/radeonsi/si_state.h
+++ b/src/gallium/drivers/radeonsi/si_state.h
@@ -245,7 +245,7 @@ struct si_descriptors {
 
 struct si_sampler_views {
        struct pipe_sampler_view        *views[SI_NUM_SAMPLERS];
-       void                            *sampler_states[SI_NUM_SAMPLERS];
+       struct si_sampler_state         *sampler_states[SI_NUM_SAMPLERS];
 
        /* The i-th bit is set if that element is enabled (non-NULL resource). 
*/
        unsigned                        enabled_mask;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to