gallium: mark the input data as const in pipe_grid_info
authorKarol Herbst <kherbst@redhat.com>
Fri, 1 Jul 2022 12:40:33 +0000 (14:40 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 4 Aug 2022 23:53:50 +0000 (23:53 +0000)
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>

src/gallium/drivers/llvmpipe/lp_jit.h
src/gallium/drivers/llvmpipe/lp_state_cs.c
src/gallium/drivers/llvmpipe/lp_state_cs.h
src/gallium/include/pipe/p_state.h

index 529c1d5..a4ac083 100644 (file)
@@ -438,7 +438,7 @@ struct lp_jit_cs_context
 
    struct lp_jit_buffer ssbos[LP_MAX_TGSI_SHADER_BUFFERS];
 
-   void *kernel_args;
+   const void *kernel_args;
 
    uint32_t shared_size;
 
index f64fd84..0276350 100644 (file)
@@ -1272,7 +1272,7 @@ update_csctx_ssbo(struct llvmpipe_context *llvmpipe)
 }
 
 static void
-llvmpipe_cs_update_derived(struct llvmpipe_context *llvmpipe, void *input)
+llvmpipe_cs_update_derived(struct llvmpipe_context *llvmpipe, const void *input)
 {
    if (llvmpipe->cs_dirty & LP_CSNEW_CONSTANTS) {
       lp_csctx_set_cs_constants(llvmpipe->csctx,
index 6a218c9..c461b61 100644 (file)
@@ -150,7 +150,7 @@ struct lp_cs_context {
       struct pipe_image_view current;
    } images[LP_MAX_TGSI_SHADER_IMAGES];
 
-   void *input;
+   const void *input;
 };
 
 struct lp_cs_context *lp_csctx_create(struct pipe_context *pipe);
index d96d24e..22b1dae 100644 (file)
@@ -934,7 +934,7 @@ struct pipe_grid_info
     * Will be used to initialize the INPUT resource, and it should point to a
     * buffer of at least pipe_compute_state::req_input_mem bytes.
     */
-   void *input;
+   const void *input;
 
    /**
     * Grid number of dimensions, 1-3, e.g. the work_dim parameter passed to