From 08183841eb56227f6f5b5d0728e2885cf31f5b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 17 Oct 2018 17:59:35 +0200 Subject: [PATCH] vkd3d-shader: Translate sample_b instructions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- libs/vkd3d-shader/spirv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 5d34a847..fce6e039 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -5448,6 +5448,12 @@ static void vkd3d_dxbc_compiler_emit_sample(struct vkd3d_dxbc_compiler *compiler case VKD3DSIH_SAMPLE: op = SpvOpImageSampleImplicitLod; break; + case VKD3DSIH_SAMPLE_B: + op = SpvOpImageSampleImplicitLod; + operands_mask |= SpvImageOperandsBiasMask; + image_operands[image_operand_count++] = vkd3d_dxbc_compiler_emit_load_src(compiler, + &src[3], VKD3DSP_WRITEMASK_0); + break; case VKD3DSIH_SAMPLE_GRAD: op = SpvOpImageSampleExplicitLod; operands_mask |= SpvImageOperandsGradMask; @@ -6458,6 +6464,7 @@ void vkd3d_dxbc_compiler_handle_instruction(struct vkd3d_dxbc_compiler *compiler vkd3d_dxbc_compiler_emit_ld(compiler, instruction); break; case VKD3DSIH_SAMPLE: + case VKD3DSIH_SAMPLE_B: case VKD3DSIH_SAMPLE_GRAD: case VKD3DSIH_SAMPLE_LOD: vkd3d_dxbc_compiler_emit_sample(compiler, instruction);