buffer_cache: Fix copy based uniform bindings tracking
This commit is contained in:
parent
15bdd27cac
commit
60a96c49e5
2 changed files with 22 additions and 9 deletions
|
@ -92,16 +92,14 @@ public:
|
|||
VideoCore::Surface::PixelFormat format);
|
||||
|
||||
void BindFastUniformBuffer(size_t stage, u32 binding_index, u32 size) {
|
||||
const GLuint handle = fast_uniforms[stage][binding_index].handle;
|
||||
const GLsizeiptr gl_size = static_cast<GLsizeiptr>(size);
|
||||
if (use_assembly_shaders) {
|
||||
const GLuint handle = fast_uniforms[stage][binding_index].handle;
|
||||
const GLsizeiptr gl_size = static_cast<GLsizeiptr>(size);
|
||||
glBindBufferRangeNV(PABO_LUT[stage], binding_index, handle, 0, gl_size);
|
||||
} else {
|
||||
const GLuint base_binding = graphics_base_uniform_bindings[stage];
|
||||
const GLuint binding = base_binding + binding_index;
|
||||
glBindBufferRange(GL_UNIFORM_BUFFER, binding,
|
||||
fast_uniforms[stage][binding_index].handle, 0,
|
||||
static_cast<GLsizeiptr>(size));
|
||||
glBindBufferRange(GL_UNIFORM_BUFFER, binding, handle, 0, gl_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,6 +132,10 @@ public:
|
|||
return has_fast_buffer_sub_data;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool SupportsNonZeroUniformOffset() const noexcept {
|
||||
return !use_assembly_shaders;
|
||||
}
|
||||
|
||||
void SetBaseUniformBindings(const std::array<GLuint, 5>& bindings) {
|
||||
graphics_base_uniform_bindings = bindings;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue