diff options
author | Kenneth Graunke <[email protected]> | 2016-01-05 04:46:33 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-01-05 18:07:27 -0800 |
commit | 25b7e4a01f20df4ca94a5381dee5b33294f6c161 (patch) | |
tree | 17b55b56322675fe13052674d4c7a022e09310b1 /src | |
parent | 3d402d445003f00478d7eb51eec8e4f31fef9352 (diff) |
i965: Use rcp in brw_lower_texture_gradients rather than 1.0 / x.
That's what it's for. Plus, we actually implement rcp.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp b/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp index d571ecd4394..c83b2728b98 100644 --- a/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp +++ b/src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp @@ -279,7 +279,7 @@ lower_texture_grad_visitor::visit_leave(ir_texture *ir) /* 2. quotient rule */ ir_variable *recip = temp(mem_ctx, glsl_type::float_type, "recip"); - EMIT(assign(recip, div(new(mem_ctx) ir_constant(1.0f), swizzle_z(Q)))); + EMIT(assign(recip, expr(ir_unop_rcp, swizzle_z(Q)))); ir_variable *dx = temp(mem_ctx, glsl_type::vec2_type, "dx"); ir_variable *dy = temp(mem_ctx, glsl_type::vec2_type, "dy"); |