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

Author: Nicolai Hähnle <[email protected]>
Date:   Thu Sep 28 21:46:30 2017 +0200

r600: cleanup set_occlusion_query_state

This fixes a warning caused by the fork (note the change in the function
signature):

../../../../../mesa-src/src/gallium/drivers/r600/r600_state_common.c: In 
function ‘r600_init_common_state_functions’:
../../../../../mesa-src/src/gallium/drivers/r600/r600_state_common.c:2974:36: 
warning: assignment from incompatible pointer type 
[-Wincompatible-pointer-types]
  rctx->b.set_occlusion_query_state = r600_set_occlusion_query_state;

Reviewed-by: Marek Olšák <[email protected]>

---

 src/gallium/drivers/r600/r600_pipe_common.h  |  3 ---
 src/gallium/drivers/r600/r600_query.c        |  4 +++-
 src/gallium/drivers/r600/r600_state_common.c | 10 ----------
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_pipe_common.h 
b/src/gallium/drivers/r600/r600_pipe_common.h
index 39dd45aace..719efb9bba 100644
--- a/src/gallium/drivers/r600/r600_pipe_common.h
+++ b/src/gallium/drivers/r600/r600_pipe_common.h
@@ -703,9 +703,6 @@ struct r600_common_context {
        void (*rebind_buffer)(struct pipe_context *ctx, struct pipe_resource 
*buf,
                              uint64_t old_gpu_address);
 
-       /* Enable or disable occlusion queries. */
-       void (*set_occlusion_query_state)(struct pipe_context *ctx, bool 
enable);
-
        void (*save_qbo_state)(struct pipe_context *ctx, struct r600_qbo_state 
*st);
 
        /* This ensures there is enough space in the command stream. */
diff --git a/src/gallium/drivers/r600/r600_query.c 
b/src/gallium/drivers/r600/r600_query.c
index 03ff1018a7..4c6311c79e 100644
--- a/src/gallium/drivers/r600/r600_query.c
+++ b/src/gallium/drivers/r600/r600_query.c
@@ -23,6 +23,7 @@
  */
 
 #include "r600_query.h"
+#include "r600_pipe.h"
 #include "r600_cs.h"
 #include "util/u_memory.h"
 #include "util/u_upload_mgr.h"
@@ -710,7 +711,8 @@ static void r600_update_occlusion_query_state(struct 
r600_common_context *rctx,
                perfect_enable = rctx->num_perfect_occlusion_queries != 0;
 
                if (enable != old_enable || perfect_enable != 
old_perfect_enable) {
-                       rctx->set_occlusion_query_state(&rctx->b, enable);
+                       struct r600_context *ctx = (struct r600_context*)rctx;
+                       r600_mark_atom_dirty(ctx, &ctx->db_misc_state.atom);
                }
        }
 }
diff --git a/src/gallium/drivers/r600/r600_state_common.c 
b/src/gallium/drivers/r600/r600_state_common.c
index 38f4ca0fc4..7e2b34bf79 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -2914,15 +2914,6 @@ static void r600_set_active_query_state(struct 
pipe_context *ctx, boolean enable
        }
 }
 
-static void r600_set_occlusion_query_state(struct pipe_context *ctx,
-                                          bool old_enable,
-                                          bool old_perfect_enable)
-{
-       struct r600_context *rctx = (struct r600_context*)ctx;
-
-       r600_mark_atom_dirty(rctx, &rctx->db_misc_state.atom);
-}
-
 static void r600_need_gfx_cs_space(struct pipe_context *ctx, unsigned num_dw,
                                    bool include_draw_vbo)
 {
@@ -2971,6 +2962,5 @@ void r600_init_common_state_functions(struct r600_context 
*rctx)
        rctx->b.b.set_active_query_state = r600_set_active_query_state;
        rctx->b.b.draw_vbo = r600_draw_vbo;
        rctx->b.invalidate_buffer = r600_invalidate_buffer;
-       rctx->b.set_occlusion_query_state = r600_set_occlusion_query_state;
        rctx->b.need_gfx_cs_space = r600_need_gfx_cs_space;
 }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to