summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/cso_cache/cso_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/cso_cache/cso_context.c')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index eda13c4e301..df040ee6372 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -376,6 +376,24 @@ void cso_destroy_context( struct cso_context *ctx )
struct pipe_screen *scr = ctx->pipe->screen;
enum pipe_shader_type sh;
for (sh = 0; sh < PIPE_SHADER_TYPES; sh++) {
+ switch (sh) {
+ case PIPE_SHADER_GEOMETRY:
+ if (!ctx->has_geometry_shader)
+ continue;
+ break;
+ case PIPE_SHADER_TESS_CTRL:
+ case PIPE_SHADER_TESS_EVAL:
+ if (!ctx->has_tessellation)
+ continue;
+ break;
+ case PIPE_SHADER_COMPUTE:
+ if (!ctx->has_compute_shader)
+ continue;
+ break;
+ default:
+ break;
+ }
+
int maxsam = scr->get_shader_param(scr, sh,
PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS);
int maxview = scr->get_shader_param(scr, sh,