+ /* DXIL does not have an instrinsic for sample info, and resinfo is expected to return + * the sample count in .w for MS textures. The result is always a struct of 4 x uint32. */ + vsir_instruction_init(ins, &sm6->p.location, VKD3DSIH_SAMPLE_INFO); + ins->flags = VKD3DSI_SAMPLE_INFO_UINT_SCALAR; + + if (!(src_params = instruction_src_params_alloc(ins, 1, sm6))) + return; + src_param_init_vector_from_reg(&src_params[0], &resource->u.handle.reg); + src_params[0].swizzle = VKD3D_SHADER_SWIZZLE(X, X, X, X);
SAMPLE_INFO does respect the source swizzle though, so I think we could just use VKD3DSI_SAMPLE_INFO_UINT here?