Mesa (master): mesa: fix indentation in _mesa_uniform()
Samuel Pitoiset
hakzsam at kemper.freedesktop.org
Tue May 16 07:33:47 UTC 2017
Module: Mesa
Branch: master
Commit: 3c95a4fd4c50261b8c0c9d878e9f4f8dce571220
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3c95a4fd4c50261b8c0c9d878e9f4f8dce571220
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Mon May 15 12:55:04 2017 +0200
mesa: fix indentation in _mesa_uniform()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Elie Tournier <elie.tournier at collabora.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
---
src/mesa/main/uniform_query.cpp | 37 +++++++++++++++++++------------------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index 79a66a7ac3..979bd0dc46 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -957,19 +957,19 @@ _mesa_uniform(GLint location, GLsizei count, const GLvoid *values,
*/
if (!uni->type->is_boolean()) {
memcpy(&uni->storage[size_mul * components * offset], values,
- sizeof(uni->storage[0]) * components * count * size_mul);
+ sizeof(uni->storage[0]) * components * count * size_mul);
} else {
const union gl_constant_value *src =
- (const union gl_constant_value *) values;
+ (const union gl_constant_value *) values;
union gl_constant_value *dst = &uni->storage[components * offset];
const unsigned elems = components * count;
for (unsigned i = 0; i < elems; i++) {
- if (basicType == GLSL_TYPE_FLOAT) {
+ if (basicType == GLSL_TYPE_FLOAT) {
dst[i].i = src[i].f != 0.0f ? ctx->Const.UniformBooleanTrue : 0;
- } else {
+ } else {
dst[i].i = src[i].i != 0 ? ctx->Const.UniformBooleanTrue : 0;
- }
+ }
}
}
@@ -980,14 +980,15 @@ _mesa_uniform(GLint location, GLsizei count, const GLvoid *values,
*/
if (uni->type->is_sampler()) {
bool flushed = false;
+
shProg->SamplersValidated = GL_TRUE;
for (int i = 0; i < MESA_SHADER_STAGES; i++) {
- struct gl_linked_shader *const sh = shProg->_LinkedShaders[i];
+ struct gl_linked_shader *const sh = shProg->_LinkedShaders[i];
- /* If the shader stage doesn't use the sampler uniform, skip this. */
- if (!uni->opaque[i].active)
- continue;
+ /* If the shader stage doesn't use the sampler uniform, skip this. */
+ if (!uni->opaque[i].active)
+ continue;
bool changed = false;
for (int j = 0; j < count; j++) {
@@ -998,17 +999,17 @@ _mesa_uniform(GLint location, GLsizei count, const GLvoid *values,
}
}
- if (changed) {
- if (!flushed) {
- FLUSH_VERTICES(ctx, _NEW_TEXTURE_OBJECT | _NEW_PROGRAM);
- flushed = true;
- }
+ if (changed) {
+ if (!flushed) {
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE_OBJECT | _NEW_PROGRAM);
+ flushed = true;
+ }
struct gl_program *const prog = sh->Program;
- _mesa_update_shader_textures_used(shProg, prog);
+ _mesa_update_shader_textures_used(shProg, prog);
if (ctx->Driver.SamplerUniformChange)
- ctx->Driver.SamplerUniformChange(ctx, prog->Target, prog);
- }
+ ctx->Driver.SamplerUniformChange(ctx, prog->Target, prog);
+ }
}
}
@@ -1017,7 +1018,7 @@ _mesa_uniform(GLint location, GLsizei count, const GLvoid *values,
*/
if (uni->type->is_image()) {
for (int i = 0; i < MESA_SHADER_STAGES; i++) {
- if (uni->opaque[i].active) {
+ if (uni->opaque[i].active) {
struct gl_linked_shader *sh = shProg->_LinkedShaders[i];
for (int j = 0; j < count; j++)
More information about the mesa-commit
mailing list