aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-01-31 23:52:14 +0100
committerMarek Olšák <[email protected]>2013-02-06 14:51:31 +0100
commit48689ca14a0a28aa03a54b5fa57ecca67d2da051 (patch)
treeb4d165fb702964e9364855ae7e46c47e23672008 /src/mesa/state_tracker/st_glsl_to_tgsi.cpp
parentafd4178fecc5d027e499085d6a4279bf2f890789 (diff)
st/mesa: advertise ARB_shading_language_packing for GLSL >= 1.30
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_glsl_to_tgsi.cpp')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 3e9ff805a4b..b20dfd5dbb5 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5167,6 +5167,21 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
options->EmitNoIndirectUniform);
}
+ if (ctx->Extensions.ARB_shading_language_packing) {
+ unsigned lower_inst = LOWER_PACK_SNORM_2x16 |
+ LOWER_UNPACK_SNORM_2x16 |
+ LOWER_PACK_UNORM_2x16 |
+ LOWER_UNPACK_UNORM_2x16 |
+ LOWER_PACK_SNORM_4x8 |
+ LOWER_UNPACK_SNORM_4x8 |
+ LOWER_UNPACK_UNORM_4x8 |
+ LOWER_PACK_UNORM_4x8 |
+ LOWER_PACK_HALF_2x16 |
+ LOWER_UNPACK_HALF_2x16;
+
+ lower_packing_builtins(ir, lower_inst);
+ }
+
do_mat_op_to_vec(ir);
lower_instructions(ir,
MOD_TO_FRACT |