return;
/* Exit early when we are dealing with a ff shader with no source file to
- * generate a source from.
+ * generate a source from, or with a SPIR-V shader.
*
* TODO: In future we should use another method to generate a key for ff
- * programs.
+ * programs, and SPIR-V shaders.
*/
static const char zero[sizeof(prog->data->sha1)] = {0};
if (memcmp(prog->data->sha1, zero, sizeof(prog->data->sha1)) == 0)
shader_cache_read_program_metadata(struct gl_context *ctx,
struct gl_shader_program *prog)
{
- /* Fixed function programs generated by Mesa are not cached. So don't
- * try to read metadata for them from the cache.
+ /* Fixed function programs generated by Mesa, or SPIR-V shaders, are not
+ * cached. So don't try to read metadata for them from the cache.
*/
- if (prog->Name == 0)
+ if (prog->Name == 0 || prog->data->spirv)
return false;
struct disk_cache *cache = ctx->Cache;