glsl: Remove never used sin_reduced/cos_reduced.
authorMatt Turner <mattst88@gmail.com>
Thu, 2 Apr 2015 00:44:16 +0000 (17:44 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 6 Apr 2015 17:13:22 +0000 (10:13 -0700)
These were added in commit f2616e56, presumably in preparation for
translating ARB vp/fp into GLSL IR. That never happened, and neither did
a lowering pass that actually generated these instructions.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/ir.cpp
src/glsl/ir.h
src/glsl/ir_constant_expression.cpp
src/glsl/ir_validate.cpp
src/glsl/nir/glsl_to_nir.cpp
src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 4b8ca9b0f85f9a342388caf47fd794d2fba5c1a7..9e3238552e96e57d86800bb65f8c89ae07646a4a 100644 (file)
@@ -240,8 +240,6 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
    case ir_unop_round_even:
    case ir_unop_sin:
    case ir_unop_cos:
-   case ir_unop_sin_reduced:
-   case ir_unop_cos_reduced:
    case ir_unop_dFdx:
    case ir_unop_dFdx_coarse:
    case ir_unop_dFdx_fine:
@@ -542,8 +540,6 @@ static const char *const operator_strs[] = {
    "round_even",
    "sin",
    "cos",
-   "sin_reduced",
-   "cos_reduced",
    "dFdx",
    "dFdxCoarse",
    "dFdxFine",
index 09275b3ccb03418f31e4c48395af97d4cb1ccfe7..fab1cd2d291fef18e43145679881bf4e09df18a0 100644 (file)
@@ -1314,8 +1314,6 @@ enum ir_expression_operation {
    /*@{*/
    ir_unop_sin,
    ir_unop_cos,
-   ir_unop_sin_reduced,    /**< Reduced range sin. [-pi, pi] */
-   ir_unop_cos_reduced,    /**< Reduced range cos. [-pi, pi] */
    /*@}*/
 
    /**
index ecebc3cdc3ba7e537b68ac59f02651e11e8f2c2c..171b8e95444bb280c856767199c1b707f0a5097f 100644 (file)
@@ -781,7 +781,6 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
       break;
 
    case ir_unop_sin:
-   case ir_unop_sin_reduced:
       assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
       for (unsigned c = 0; c < op[0]->type->components(); c++) {
         data.f[c] = sinf(op[0]->value.f[c]);
@@ -789,7 +788,6 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
       break;
 
    case ir_unop_cos:
-   case ir_unop_cos_reduced:
       assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
       for (unsigned c = 0; c < op[0]->type->components(); c++) {
         data.f[c] = cosf(op[0]->value.f[c]);
index 72c5f061c20a1c6fdcc5d113c26e4095d9c06cbe..cfe0df3dca6aa641567f45943ff3a5e3ccbc3063 100644 (file)
@@ -334,8 +334,6 @@ ir_validate::visit_leave(ir_expression *ir)
       break;
    case ir_unop_sin:
    case ir_unop_cos:
-   case ir_unop_sin_reduced:
-   case ir_unop_cos_reduced:
    case ir_unop_dFdx:
    case ir_unop_dFdx_coarse:
    case ir_unop_dFdx_fine:
index f48a34bb52a19165d533857eb185fa1ec489f227..80c5b3a612838024a46cd140e43a5ad1ef3b423b 100644 (file)
@@ -1087,12 +1087,6 @@ nir_visitor::visit(ir_expression *ir)
    case ir_unop_round_even: emit(nir_op_fround_even, dest_size, srcs); break;
    case ir_unop_sin:   emit(nir_op_fsin,   dest_size, srcs); break;
    case ir_unop_cos:   emit(nir_op_fcos,   dest_size, srcs); break;
-   case ir_unop_sin_reduced:
-      emit(nir_op_fsin_reduced, dest_size, srcs);
-      break;
-   case ir_unop_cos_reduced:
-      emit(nir_op_fcos_reduced, dest_size, srcs);
-      break;
    case ir_unop_dFdx:        emit(nir_op_fddx,        dest_size, srcs); break;
    case ir_unop_dFdy:        emit(nir_op_fddy,        dest_size, srcs); break;
    case ir_unop_dFdx_fine:   emit(nir_op_fddx_fine,   dest_size, srcs); break;
index 4049b09797c047d7c43c0f22cd6e10f7fa10741b..d0f61222e5a90a904377635672680b12cd945f8e 100644 (file)
@@ -232,8 +232,6 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
    case ir_unop_round_even:
    case ir_unop_sin:
    case ir_unop_cos:
-   case ir_unop_sin_reduced:
-   case ir_unop_cos_reduced:
    case ir_unop_dFdx:
    case ir_unop_dFdx_coarse:
    case ir_unop_dFdx_fine:
index e6fb0cbe8465fcc2862420950f3e425d76f9560e..305972d5baa7bc5b29bc0b56904590d331c5bc38 100644 (file)
@@ -817,11 +817,9 @@ fs_visitor::visit(ir_expression *ir)
    case ir_unop_log:
       unreachable("not reached: should be handled by ir_explog_to_explog2");
    case ir_unop_sin:
-   case ir_unop_sin_reduced:
       emit_math(SHADER_OPCODE_SIN, this->result, op[0]);
       break;
    case ir_unop_cos:
-   case ir_unop_cos_reduced:
       emit_math(SHADER_OPCODE_COS, this->result, op[0]);
       break;
 
index ca1a9958b5b44ac2fd4c491424cf38f19665b466..ffbe04d0a951ce8c45c0ba7c6f9013219dfe0623 100644 (file)
@@ -1411,11 +1411,9 @@ vec4_visitor::visit(ir_expression *ir)
    case ir_unop_log:
       unreachable("not reached: should be handled by ir_explog_to_explog2");
    case ir_unop_sin:
-   case ir_unop_sin_reduced:
       emit_math(SHADER_OPCODE_SIN, result_dst, op[0]);
       break;
    case ir_unop_cos:
-   case ir_unop_cos_reduced:
       emit_math(SHADER_OPCODE_COS, result_dst, op[0]);
       break;
 
index 39790ec8e8c9a483a1abf24e59f8b4827596a135..3a78dc4f0e39c0b29e61f60290ddb7774d4f3f4d 100644 (file)
@@ -1122,12 +1122,6 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
    case ir_unop_cos:
       emit_scalar(ir, OPCODE_COS, result_dst, op[0]);
       break;
-   case ir_unop_sin_reduced:
-      emit_scs(ir, OPCODE_SIN, result_dst, op[0]);
-      break;
-   case ir_unop_cos_reduced:
-      emit_scs(ir, OPCODE_COS, result_dst, op[0]);
-      break;
 
    case ir_unop_dFdx:
       emit(ir, OPCODE_DDX, result_dst, op[0]);
index e97ab83f2cda43dfc48bf04021a7cb988b45805d..96c1f355f3447ea1800edaab6e20285f4e979f64 100644 (file)
@@ -1611,12 +1611,6 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
    case ir_unop_cos:
       emit_scalar(ir, TGSI_OPCODE_COS, result_dst, op[0]);
       break;
-   case ir_unop_sin_reduced:
-      emit_scs(ir, TGSI_OPCODE_SIN, result_dst, op[0]);
-      break;
-   case ir_unop_cos_reduced:
-      emit_scs(ir, TGSI_OPCODE_COS, result_dst, op[0]);
-      break;
    case ir_unop_saturate: {
       glsl_to_tgsi_instruction *inst;
       inst = emit(ir, TGSI_OPCODE_MOV, result_dst, op[0]);