diff options
author | Marek Olšák <[email protected]> | 2010-06-05 05:07:41 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-06-05 07:03:15 +0200 |
commit | f855e16afa086edfc2f03360a27f66c955a6c208 (patch) | |
tree | 1a2ece5410f3c57fa7c57ad0be8ccfcb0faa760c /src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c | |
parent | 722db9fa77de16b92adf19fda00c9671d896749e (diff) |
r300/compiler: implement SIN+COS+SCS for vertex shaders
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c index dd307856a77..507b2e532fe 100644 --- a/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c +++ b/src/mesa/drivers/dri/r300/compiler/r3xx_vertprog.c @@ -360,6 +360,7 @@ static void translate_vertex_program(struct r300_vertex_program_compiler * compi switch (vpi->Opcode) { case RC_OPCODE_ADD: ei_vector2(compiler->code, VE_ADD, vpi, inst); break; case RC_OPCODE_ARL: ei_vector1(compiler->code, VE_FLT2FIX_DX, vpi, inst); break; + case RC_OPCODE_COS: ei_math1(compiler->code, ME_COS, vpi, inst); break; case RC_OPCODE_DP4: ei_vector2(compiler->code, VE_DOT_PRODUCT, vpi, inst); break; case RC_OPCODE_DST: ei_vector2(compiler->code, VE_DISTANCE_VECTOR, vpi, inst); break; case RC_OPCODE_EX2: ei_math1(compiler->code, ME_EXP_BASE2_FULL_DX, vpi, inst); break; @@ -378,6 +379,7 @@ static void translate_vertex_program(struct r300_vertex_program_compiler * compi case RC_OPCODE_RSQ: ei_math1(compiler->code, ME_RECIP_SQRT_DX, vpi, inst); break; case RC_OPCODE_SEQ: ei_vector2(compiler->code, VE_SET_EQUAL, vpi, inst); break; case RC_OPCODE_SGE: ei_vector2(compiler->code, VE_SET_GREATER_THAN_EQUAL, vpi, inst); break; + case RC_OPCODE_SIN: ei_math1(compiler->code, ME_SIN, vpi, inst); break; case RC_OPCODE_SLT: ei_vector2(compiler->code, VE_SET_LESS_THAN, vpi, inst); break; case RC_OPCODE_SNE: ei_vector2(compiler->code, VE_SET_NOT_EQUAL, vpi, inst); break; default: @@ -605,8 +607,9 @@ void r3xx_compile_vertex_program(struct r300_vertex_program_compiler* compiler) { struct radeon_program_transformation transformations[] = { { &r300_transform_vertex_alu, 0 }, + { &r300_transform_trig_scale_vertex, 0 } }; - radeonLocalTransform(&compiler->Base, 1, transformations); + radeonLocalTransform(&compiler->Base, 2, transformations); } debug_program_log(compiler, "after native rewrite"); |