summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-05-15 12:55:04 +0200
committerSamuel Pitoiset <[email protected]>2017-05-16 09:33:02 +0200
commit3c95a4fd4c50261b8c0c9d878e9f4f8dce571220 (patch)
tree0e96ebba13851cb9b5140bddd52c87e4ad6fd09f /src/mesa/main
parent989def73ec3d94c680930810bef34971433b7b3e (diff)
mesa: fix indentation in _mesa_uniform()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Elie Tournier <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/uniform_query.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index 79a66a7ac3a..979bd0dc461 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++)