DRW: Fix error in texture binding / unbinding.

This commit is contained in:
Clément Foucault 2018-03-17 18:48:14 +01:00
parent c2f36c3558
commit 1ed287058d
1 changed files with 2 additions and 2 deletions

View File

@ -764,10 +764,10 @@ static void bind_ubo(GPUUniformBuffer *ubo, char bind_type)
static void release_texture_slots(bool with_persist)
{
if (with_persist) {
memset(DST.RST.bound_tex_slots, 0x0, sizeof(*DST.RST.bound_tex_slots) * GPU_max_ubo_binds());
memset(DST.RST.bound_tex_slots, 0x0, sizeof(*DST.RST.bound_tex_slots) * GPU_max_textures());
}
else {
for (int i = 0; i < GPU_max_ubo_binds(); ++i) {
for (int i = 0; i < GPU_max_textures(); ++i) {
if (DST.RST.bound_tex_slots[i] != BIND_PERSIST)
DST.RST.bound_tex_slots[i] = BIND_NONE;
}