diff --git a/libs/vkd3d-shader/msl.c b/libs/vkd3d-shader/msl.c index 32ae42d72..25a10145a 100644 --- a/libs/vkd3d-shader/msl.c +++ b/libs/vkd3d-shader/msl.c @@ -1444,6 +1444,9 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d case VSIR_OP_COS: msl_intrinsic(gen, ins, "cos"); break; + case VSIR_OP_COUNTBITS: + msl_intrinsic(gen, ins, "popcount"); + break; case VSIR_OP_DCL_INDEXABLE_TEMP: msl_dcl_indexable_temp(gen, ins); break; diff --git a/tests/hlsl/bitwise.shader_test b/tests/hlsl/bitwise.shader_test index 775b5568b..82a8d4630 100644 --- a/tests/hlsl/bitwise.shader_test +++ b/tests/hlsl/bitwise.shader_test @@ -8,7 +8,7 @@ float4 main() : sv_target [test] uniform 0 uint4 0 0xffffffff 0xcccccccc 0x31415926 -todo(sm<4 | msl & sm>=6) draw quad +todo(sm<4) draw quad if(sm>=4) probe (0, 0) f32(0, 32, 16, 12) if(sm<4) probe (0, 0) f32(0, 0, 0, 0)