Mesa (7.9): glsl: Fix constant component count in vector constructor emitting.
Ian Romanick
idr at kemper.freedesktop.org
Tue Dec 14 21:13:05 UTC 2010
Module: Mesa
Branch: 7.9
Commit: 1d63a771779bcb46a4c69f1fe9c4c69074e417b7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d63a771779bcb46a4c69f1fe9c4c69074e417b7
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Mon Oct 25 12:44:55 2010 -0700
glsl: Fix constant component count in vector constructor emitting.
Fixes freedesktop.org bug #31101 as well as piglit test cases
assignment-type-mismatch.vert and constructor-28.vert.
(cherry picked from commit ba2382f50d7815947e17fe993b39feb573638d12)
---
src/glsl/ast_function.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index 20448f5..e31f799 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -545,7 +545,7 @@ emit_inline_vector_constructor(const glsl_type *type,
/* Mask of fields to be written in the assignment.
*/
constant_mask |= ((1U << rhs_components) - 1) << base_lhs_component;
- constant_components++;
+ constant_components += rhs_components;
base_component += rhs_components;
}
More information about the mesa-commit
mailing list