GL: Add support for compute shaders

This commit is contained in:
Connor McLaughlin
2022-11-23 11:45:37 +00:00
committed by refractionpcsx2
parent 46db4077b8
commit d132ddefef
4 changed files with 175 additions and 31 deletions
+11
View File
@@ -137,6 +137,17 @@ namespace GL
return true;
}
bool Program::CompileCompute(const std::string_view glsl)
{
GLuint id = CompileShader(GL_COMPUTE_SHADER, glsl);
if (id == 0)
return false;
m_program_id = glCreateProgram();
glAttachShader(m_program_id, id);
return true;
}
bool Program::CreateFromBinary(const void* data, u32 data_length, u32 data_format)
{
GLuint prog = glCreateProgram();