radv: check that layout isn't NULL in radv_nir_shader_info_pass()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 14 May 2018 14:04:33 +0000 (16:04 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 14 May 2018 19:38:17 +0000 (21:38 +0200)
An upcoming patch will run the shader info pass on the
geometry shader just before emitting the GS copy shader.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_shader_info.c

index aa06efc9dc70eb08dc2b9b48db2b6ec70db0f852..a436bd753430a525f38b972b6352f7f3616b5d54 100644 (file)
@@ -424,7 +424,7 @@ radv_nir_shader_info_pass(const struct nir_shader *nir,
        struct nir_function *func =
                (struct nir_function *)exec_list_get_head_const(&nir->functions);
 
-       if (options->layout->dynamic_offset_count)
+       if (options->layout && options->layout->dynamic_offset_count)
                info->loads_push_constants = true;
 
        nir_foreach_variable(variable, &nir->inputs)