diff options
author | Marek Olšák <[email protected]> | 2016-01-02 19:58:26 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-01-08 20:06:22 +0100 |
commit | 91e8f2b0a58c1f5a00f447f60213e9ec2f5b6e6e (patch) | |
tree | 5aac64d51021933305d26583b4fc10523cf30f63 | |
parent | cb513485a0afba543a2bedb2ecd4d9ea979b5f9a (diff) |
st/mesa: remove dead code from mesa_to_tgsi
These aren't part of ARB_fragment_program.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 4b9dc994ea5..d8f7b6c0725 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -475,24 +475,6 @@ static void emit_swz( struct st_translate *t, } -/** - * Negate the value of DDY to match GL semantics where (0,0) is the - * lower-left corner of the window. - * Note that the GL_ARB_fragment_coord_conventions extension will - * effect this someday. - */ -static void emit_ddy( struct st_translate *t, - struct ureg_dst dst, - const struct prog_src_register *SrcReg ) -{ - struct ureg_program *ureg = t->ureg; - struct ureg_src src = translate_src( t, SrcReg ); - src = ureg_negate( src ); - ureg_DDY( ureg, dst, src ); -} - - - static unsigned translate_opcode( unsigned op ) { @@ -714,10 +696,6 @@ compile_instruction( */ ureg_MOV( ureg, dst[0], ureg_imm1f(ureg, 0.5) ); break; - - case OPCODE_DDY: - emit_ddy( t, dst[0], &inst->SrcReg[0] ); - break; case OPCODE_RSQ: ureg_RSQ( ureg, dst[0], ureg_abs(src[0]) ); @@ -926,31 +904,6 @@ emit_wpos(struct st_context *st, /** - * OpenGL's fragment gl_FrontFace input is 1 for front-facing, 0 for back. - * TGSI uses +1 for front, -1 for back. - * This function converts the TGSI value to the GL value. Simply clamping/ - * saturating the value to [0,1] does the job. - */ -static void -emit_face_var( struct st_translate *t, - const struct gl_program *program ) -{ - struct ureg_program *ureg = t->ureg; - struct ureg_dst face_temp = ureg_DECL_temporary( ureg ); - struct ureg_src face_input = t->inputs[t->inputMapping[VARYING_SLOT_FACE]]; - - /* MOV_SAT face_temp, input[face] - */ - face_temp = ureg_saturate( face_temp ); - ureg_MOV( ureg, face_temp, face_input ); - - /* Use face_temp as face input from here on: - */ - t->inputs[t->inputMapping[VARYING_SLOT_FACE]] = ureg_src(face_temp); -} - - -/** * Translate Mesa program to TGSI format. * \param program the program to translate * \param numInputs number of input registers used @@ -1020,10 +973,6 @@ st_translate_mesa_program( emit_wpos(st_context(ctx), t, program, ureg); } - if (program->InputsRead & VARYING_BIT_FACE) { - emit_face_var( t, program ); - } - /* * Declare output attributes. */ |