Rename some internal buffer enums to better match what they do

This commit is contained in:
Alex Szpakowski
2021-01-17 20:59:16 -04:00
parent 2e2ebe95cd
commit deff795908
25 changed files with 217 additions and 215 deletions
+6 -6
View File
@@ -315,7 +315,7 @@ void Shader::mapActiveUniforms()
}
}
if (gl.isBufferTypeSupported(BUFFERTYPE_SHADER_STORAGE))
if (gl.isBufferUsageSupported(BUFFERUSAGE_SHADER_STORAGE))
{
GLint numstoragebuffers = 0;
glGetProgramInterfaceiv(program, GL_SHADER_STORAGE_BLOCK, GL_ACTIVE_RESOURCES, &numstoragebuffers);
@@ -586,7 +586,7 @@ void Shader::attach()
}
for (auto bufferbinding : activeStorageBufferBindings)
gl.bindIndexedBuffer(bufferbinding.buffer, BUFFERTYPE_SHADER_STORAGE, bufferbinding.bindingindex);
gl.bindIndexedBuffer(bufferbinding.buffer, BUFFERUSAGE_SHADER_STORAGE, bufferbinding.bindingindex);
// send any pending uniforms to the shader program.
for (const auto &p : pendingUniformUpdates)
@@ -816,9 +816,9 @@ void Shader::sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffe
bool storagebinding = info->baseType == UNIFORM_STORAGEBUFFER;
if (texelbinding)
requiredtypeflags = Buffer::TYPEFLAG_TEXEL;
requiredtypeflags = BUFFERUSAGEFLAG_TEXEL;
else if (storagebinding)
requiredtypeflags = Buffer::TYPEFLAG_SHADER_STORAGE;
requiredtypeflags = BUFFERUSAGEFLAG_SHADER_STORAGE;
if (requiredtypeflags == 0)
return;
@@ -837,7 +837,7 @@ void Shader::sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffe
if (buffer != nullptr)
{
if ((buffer->getTypeFlags() & requiredtypeflags) == 0)
if ((buffer->getUsageFlags() & requiredtypeflags) == 0)
{
if (internalUpdate)
continue;
@@ -915,7 +915,7 @@ void Shader::sendBuffers(const UniformInfo *info, love::graphics::Buffer **buffe
glbuffer = gl.getDefaultStorageBuffer();
if (shaderactive)
gl.bindIndexedBuffer(glbuffer, BUFFERTYPE_SHADER_STORAGE, bindingindex);
gl.bindIndexedBuffer(glbuffer, BUFFERUSAGE_SHADER_STORAGE, bindingindex);
int activeindex = storageBufferBindingIndexToActiveBinding[bindingindex];
if (activeindex >= 0)