Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-05 19:16:13 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-05 19:16:13 +0300
commit581c35bea894f07de6a2ad6bbc7eb85e828c7743 (patch)
tree0e4602f761a1a700fd60067c39d6c1675f7dec97
parent03b36abbe6f0b6b5a73e585ece49cd87b11ab190 (diff)
GLState: Fix compilation warning on MSVC
-rw-r--r--source/blender/gpu/opengl/gl_state.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc
index a97768e5d44..ad3692d5813 100644
--- a/source/blender/gpu/opengl/gl_state.cc
+++ b/source/blender/gpu/opengl/gl_state.cc
@@ -446,7 +446,7 @@ void GLStateManager::texture_bind(Texture *tex_, eGPUSamplerState sampler_type,
textures_[unit] = tex->tex_id_;
samplers_[unit] = GLTexture::samplers_[sampler_type];
tex->is_bound_ = true;
- dirty_texture_binds_ |= 1 << unit;
+ dirty_texture_binds_ |= 1UL << unit;
}
/* Bind the texture to slot 0 for editing purpose. Used by legacy pipeline. */
@@ -456,7 +456,7 @@ void GLStateManager::texture_bind_temp(GLTexture *tex)
glActiveTexture(GL_TEXTURE0);
glBindTexture(tex->target_, tex->tex_id_);
/* Will reset the first texture that was originaly bound to slot 0 back before drawing. */
- dirty_texture_binds_ |= 1;
+ dirty_texture_binds_ |= 1UL;
/* NOTE: This might leave this texture attached to this target even after update.
* In practice it is not causing problems as we have incorrect binding detection
* at higher level. */
@@ -474,7 +474,7 @@ void GLStateManager::texture_unbind(Texture *tex_)
if (textures_[i] == tex_id) {
textures_[i] = 0;
samplers_[i] = 0;
- dirty_texture_binds_ |= 1 << i;
+ dirty_texture_binds_ |= 1UL << i;
}
}
tex->is_bound_ = false;
@@ -486,7 +486,7 @@ void GLStateManager::texture_unbind_all(void)
if (textures_[i] != 0) {
textures_[i] = 0;
samplers_[i] = 0;
- dirty_texture_binds_ |= 1 << i;
+ dirty_texture_binds_ |= 1UL << i;
}
}
this->texture_bind_apply();
@@ -524,7 +524,7 @@ uint64_t GLStateManager::bound_texture_slots(void)
uint64_t bound_slots = 0;
for (int i = 0; i < ARRAY_SIZE(textures_); i++) {
if (textures_[i] != 0) {
- bound_slots |= 1 << i;
+ bound_slots |= 1UL << i;
}
}
return bound_slots;