return false;
}
- prog = ctx->Shader.CurrentProgram[MESA_SHADER_COMPUTE];
+ prog = ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE];
if (prog == NULL || prog->_LinkedShaders[MESA_SHADER_COMPUTE] == NULL) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(no active compute shader)",
if (_mesa_has_tessellation(ctx))
any_valid_stages |= GL_TESS_CONTROL_SHADER_BIT |
GL_TESS_EVALUATION_SHADER_BIT;
+ if (_mesa_has_compute_shaders(ctx))
+ any_valid_stages |= GL_COMPUTE_SHADER_BIT;
if (stages != GL_ALL_SHADER_BITS && (stages & ~any_valid_stages) != 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glUseProgramStages(Stages)");
if ((stages & GL_TESS_EVALUATION_SHADER_BIT) != 0)
_mesa_use_shader_program(ctx, GL_TESS_EVALUATION_SHADER, shProg, pipe);
+
+ if ((stages & GL_COMPUTE_SHADER_BIT) != 0)
+ _mesa_use_shader_program(ctx, GL_COMPUTE_SHADER, shProg, pipe);
}
/**
*params = pipe->CurrentProgram[MESA_SHADER_FRAGMENT]
? pipe->CurrentProgram[MESA_SHADER_FRAGMENT]->Name : 0;
return;
+ case GL_COMPUTE_SHADER:
+ if (!_mesa_has_compute_shaders(ctx))
+ break;
+ *params = pipe->CurrentProgram[MESA_SHADER_COMPUTE]
+ ? pipe->CurrentProgram[MESA_SHADER_COMPUTE]->Name : 0;
+ return;
default:
break;
}