gallivm: use lp_build_log2_safe for pow
lp_build_log2 isn't robust enough to handle special cases for pow, so let's use lp_build_log2_safe instead. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11800>
This commit is contained in:
parent
2e2e6865b4
commit
08a12feb6e
|
@ -3043,7 +3043,7 @@ lp_build_pow(struct lp_build_context *bld,
|
|||
}
|
||||
|
||||
LLVMValueRef cmp = lp_build_cmp(bld, PIPE_FUNC_EQUAL, x, lp_build_const_vec(bld->gallivm, bld->type, 0.0f));
|
||||
LLVMValueRef res = lp_build_exp2(bld, lp_build_mul(bld, lp_build_log2(bld, x), y));
|
||||
LLVMValueRef res = lp_build_exp2(bld, lp_build_mul(bld, lp_build_log2_safe(bld, x), y));
|
||||
|
||||
res = lp_build_select(bld, cmp, lp_build_const_vec(bld->gallivm, bld->type, 0.0f), res);
|
||||
return res;
|
||||
|
|
|
@ -73,7 +73,7 @@ traces:
|
|||
- path: bgfx/07-callback.rdc
|
||||
expectations:
|
||||
- device: gl-vmware-llvmpipe
|
||||
checksum: 77381f3eb028306e028ab54267a1926a
|
||||
checksum: 488d471efb84824f2d4be1c75e455881
|
||||
- path: bgfx/09-hdr.rdc
|
||||
expectations:
|
||||
- device: gl-vmware-llvmpipe
|
||||
|
|
|
@ -28,9 +28,6 @@ dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.2d.r8g8b8a8_unorm.r1
|
|||
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.2d.r8g8b8a8_unorm.r16g16b16a16_unorm.optimal_general_linear,Fail
|
||||
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.2d.r8g8b8a8_unorm.r16g16b16a16_unorm.optimal_linear_linear,Fail
|
||||
dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.ctimeolor.2d.a8b8g8r8_unorm_pack32.r16_unorm.general_optimal_linear,Fail
|
||||
dEQP-VK.glsl.builtin.precision.pow.highp.vec2,Fail
|
||||
dEQP-VK.glsl.builtin.precision.pow.highp.vec3,Fail
|
||||
dEQP-VK.glsl.builtin.precision.pow.highp.vec4,Fail
|
||||
dEQP-VK.glsl.texture_functions.query.texturequerylod.isampler2d_fragment,Fail
|
||||
dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler1d_fixed_fragment,Fail
|
||||
dEQP-VK.glsl.texture_functions.query.texturequerylod.sampler1darray_float_fragment,Fail
|
||||
|
|
Loading…
Reference in New Issue