diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2015-06-12 17:17:01 -0700 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2015-06-12 18:21:49 -0700 |
commit | 2fdd17d259f2b6abb9a76df9be70c3a467e3fb65 (patch) | |
tree | 3ff3dacf77633a90b6287d5ae0d13953913b9e99 /src/vulkan | |
parent | 00494c6cb7ec0ffd3fe12c0b450744627564f8be (diff) |
vk: Generate CS prog_data into the pipeline instance
We were generating the prog_data into a local variable and never
initializing the pipeline->cs_prog_data one.
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/compiler.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/vulkan/compiler.cpp b/src/vulkan/compiler.cpp index 0db7935f085..2a193e396e6 100644 --- a/src/vulkan/compiler.cpp +++ b/src/vulkan/compiler.cpp @@ -614,12 +614,13 @@ brw_codegen_cs_prog(struct brw_context *brw, const GLuint *program; void *mem_ctx = ralloc_context(NULL); GLuint program_size; - struct brw_cs_prog_data prog_data; + struct brw_cs_prog_data *prog_data = &pipeline->cs_prog_data; struct gl_shader *cs = prog->_LinkedShaders[MESA_SHADER_COMPUTE]; assert (cs); - memset(&prog_data, 0, sizeof(prog_data)); + memset(prog_data, 0, sizeof(*prog_data)); + /* Allocate the references to the uniforms that will end up in the * prog_data associated with the compiled program, and which will be freed @@ -629,13 +630,13 @@ brw_codegen_cs_prog(struct brw_context *brw, /* The backend also sometimes adds params for texture size. */ param_count += 2 * ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits; - prog_data.base.param = + prog_data->base.param = rzalloc_array(NULL, const gl_constant_value *, param_count); - prog_data.base.pull_param = + prog_data->base.pull_param = rzalloc_array(NULL, const gl_constant_value *, param_count); - prog_data.base.nr_params = param_count; + prog_data->base.nr_params = param_count; - program = brw_cs_emit(brw, mem_ctx, key, &prog_data, + program = brw_cs_emit(brw, mem_ctx, key, prog_data, &cp->program, prog, &program_size); if (program == NULL) { ralloc_free(mem_ctx); |