if (prog == NULL)
return false;
+ if (prog->sh.data->spirv)
+ return false;
+
if (brw->ctx._Shader->Flags & GLSL_CACHE_FALLBACK)
goto fail;
if (cache == NULL)
return;
- struct gl_program *prog =
- brw->ctx._Shader->CurrentProgram[MESA_SHADER_VERTEX];
+ struct gl_program *prog;
+ gl_shader_stage stage;
+ for (stage = MESA_SHADER_VERTEX; stage <= MESA_SHADER_FRAGMENT; stage++) {
+ prog = brw->ctx._Shader->CurrentProgram[stage];
+ if (prog && prog->sh.data->spirv)
+ return;
+ }
+
+ prog = brw->ctx._Shader->CurrentProgram[MESA_SHADER_VERTEX];
if (prog && !prog->program_written_to_cache) {
struct brw_vs_prog_key vs_key;
brw_vs_populate_key(brw, &vs_key);
struct gl_program *prog =
brw->ctx._Shader->CurrentProgram[MESA_SHADER_COMPUTE];
+
+ if (prog && prog->sh.data->spirv)
+ return;
+
if (prog && !prog->program_written_to_cache) {
struct brw_cs_prog_key cs_key;
brw_cs_populate_key(brw, &cs_key);