summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2012-06-07 00:11:28 -0700
committerKenneth Graunke <[email protected]>2012-06-07 00:17:21 -0700
commit05790746df077183d6c3caf87ca2d276a60302a8 (patch)
tree8707f2063589ca9960d1b1ac0f0f2455cc07edcc
parenta83be8b6d7acbc5cb276182506c6d45210d9e951 (diff)
i965: Enable the GL_ARB_shader_bit_encode extension.
Signed-off-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp7
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp17
-rwxr-xr-xsrc/mesa/drivers/dri/intel/intel_extensions.c1
3 files changed, 25 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 2634b0862a0..12745f23102 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -445,11 +445,18 @@ fs_visitor::visit(ir_expression *ir)
emit_math(SHADER_OPCODE_RSQ, this->result, op[0]);
break;
+ case ir_unop_bitcast_i2f:
+ case ir_unop_bitcast_u2f:
+ op[0].type = BRW_REGISTER_TYPE_F;
+ this->result = op[0];
+ break;
case ir_unop_i2u:
+ case ir_unop_bitcast_f2u:
op[0].type = BRW_REGISTER_TYPE_UD;
this->result = op[0];
break;
case ir_unop_u2i:
+ case ir_unop_bitcast_f2i:
op[0].type = BRW_REGISTER_TYPE_D;
this->result = op[0];
break;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index cfffef44605..bde84202df5 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1254,6 +1254,23 @@ vec4_visitor::visit(ir_expression *ir)
case ir_unop_rsq:
emit_math(SHADER_OPCODE_RSQ, result_dst, op[0]);
break;
+
+ case ir_unop_bitcast_i2f:
+ case ir_unop_bitcast_u2f:
+ this->result = op[0];
+ this->result.type = BRW_REGISTER_TYPE_F;
+ break;
+
+ case ir_unop_bitcast_f2i:
+ this->result = op[0];
+ this->result.type = BRW_REGISTER_TYPE_D;
+ break;
+
+ case ir_unop_bitcast_f2u:
+ this->result = op[0];
+ this->result.type = BRW_REGISTER_TYPE_UD;
+ break;
+
case ir_unop_i2f:
case ir_unop_i2u:
case ir_unop_u2i:
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 6c29aff6523..29da36ce7bb 100755
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -122,6 +122,7 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.ARB_occlusion_query = true;
ctx->Extensions.ARB_point_sprite = true;
ctx->Extensions.ARB_seamless_cube_map = true;
+ ctx->Extensions.ARB_shader_bit_encoding = true;
ctx->Extensions.ARB_shader_texture_lod = true;
#ifdef TEXTURE_FLOAT_ENABLED
ctx->Extensions.ARB_texture_float = true;