zink: copy some cs shader properties to the program struct
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 22 Aug 2023 20:13:43 +0000 (16:13 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 23 Aug 2023 18:13:55 +0000 (18:13 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24835>

src/gallium/drivers/zink/zink_program.c
src/gallium/drivers/zink/zink_types.h

index a6c2549..669f447 100644 (file)
@@ -1364,6 +1364,7 @@ create_compute_program(struct zink_context *ctx, nir_shader *nir)
    struct zink_compute_program *comp = create_program(ctx, true);
    if (!comp)
       return NULL;
+   comp->scratch_size = nir->scratch_size;
    comp->nir = nir;
    comp->num_inlinable_uniforms = nir->info.num_inlinable_uniforms;
 
index 8d9901f..0dcf7af 100644 (file)
@@ -1127,6 +1127,8 @@ struct zink_compute_program {
 
    bool use_local_size;
 
+   unsigned scratch_size;
+
    unsigned num_inlinable_uniforms;
    nir_shader *nir; //only until precompile finishes