GL: Add support for compute shaders

This commit is contained in:
Connor McLaughlin authored and refractionpcsx2 committed 2022-11-23 11:45:37 +00:00
1 parent 46db4077b8
commit d132ddefef
4 files changed
+175 -31

No files matched your search

+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();