diff --git a/libs/vkd3d-shader/glsl.c b/libs/vkd3d-shader/glsl.c index e88c0c42..26fd4818 100644 --- a/libs/vkd3d-shader/glsl.c +++ b/libs/vkd3d-shader/glsl.c @@ -792,6 +792,9 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen, case VKD3DSIH_UTOF: shader_glsl_cast(gen, ins, "float", "vec"); break; + case VKD3DSIH_LOG: + shader_glsl_intrinsic(gen, ins, "log2"); + break; case VKD3DSIH_MOV: shader_glsl_mov(gen, ins); break; diff --git a/tests/hlsl/log.shader_test b/tests/hlsl/log.shader_test index 06720ee5..eaec15e6 100644 --- a/tests/hlsl/log.shader_test +++ b/tests/hlsl/log.shader_test @@ -8,7 +8,7 @@ float4 main() : sv_target [test] uniform 0 float4 2.0 4.0 5.0 0.4 -todo(glsl) draw quad +draw quad probe (0, 0) rgba (1.0, 2.0, 2.32192802, -1.32192802) 1 [pixel shader] @@ -21,7 +21,7 @@ float4 main() : sv_target [test] uniform 0 float4 10.0 100.0 1.0 0.1 -todo(glsl) draw quad +draw quad probe (0, 0) rgba (1.0, 2.0, 0.0, -1.0) 1 [pixel shader] @@ -34,5 +34,5 @@ float4 main() : sv_target [test] uniform 0 float4 3.0 10.0 1.0 0.1 -todo(glsl) draw quad +draw quad probe (0, 0) rgba (1.0986123, 2.302585, 0.0, -2.302585) 2 diff --git a/tests/hlsl/pow.shader_test b/tests/hlsl/pow.shader_test index 20d2a2fb..41ae0d4f 100644 --- a/tests/hlsl/pow.shader_test +++ b/tests/hlsl/pow.shader_test @@ -8,7 +8,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.4 0.8 2.5 2.0 -todo(glsl) draw quad +draw quad probe (0, 0) rgba (0.512, 0.101192884, 0.64, 0.25) 4