projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8492e8
)
glsl: Allow swizzles on scalars.
author
Matt Turner
<mattst88@gmail.com>
Mon, 20 May 2013 18:01:37 +0000
(11:01 -0700)
committer
Matt Turner
<mattst88@gmail.com>
Fri, 14 Jun 2013 18:25:49 +0000
(11:25 -0700)
Required by ARB_shading_language_420pack.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/hir_field_selection.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/hir_field_selection.cpp
b/src/glsl/hir_field_selection.cpp
index cc7ba61c8f1d767f9ee925d5708bb2ccf0217b3e..ceb0a4cdb62b908b9aa8b4d532358ef1d7513f0a 100644
(file)
--- a/
src/glsl/hir_field_selection.cpp
+++ b/
src/glsl/hir_field_selection.cpp
@@
-96,7
+96,9
@@
_mesa_ast_field_selection_to_hir(const ast_expression *expr,
} else {
_mesa_glsl_error(&loc, state, "Unknown method: `%s'.", method);
}
- } else if (op->type->is_vector()) {
+ } else if (op->type->is_vector() ||
+ (state->ARB_shading_language_420pack_enable &&
+ op->type->is_scalar())) {
ir_swizzle *swiz = ir_swizzle::create(op,
expr->primary_expression.identifier,
op->type->vector_elements);