Zebediah Figura : vkd3d-shader: Remove the workaround for sample_c.
Alexandre Julliard
julliard at winehq.org
Tue Apr 26 16:24:09 CDT 2022
Module: vkd3d
Branch: master
Commit: 9839850b87a79af8b3dbce27844fe644e40fc0c6
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=9839850b87a79af8b3dbce27844fe644e40fc0c6
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Mon Apr 25 15:36:58 2022 -0500
vkd3d-shader: Remove the workaround for sample_c.
The current workaround is broken for texture cube arrays, which already have 4
components.
Sampling with the components not packed together apparently succeeds with newer
NVidia drivers, so just remove the workaround. Tested with 470.103.01 on a GTX
1060.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52886
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
libs/vkd3d-shader/spirv.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index bb5e8c6f..d746a35a 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -8336,10 +8336,10 @@ static void vkd3d_dxbc_compiler_emit_sample(struct vkd3d_dxbc_compiler *compiler
static void vkd3d_dxbc_compiler_emit_sample_c(struct vkd3d_dxbc_compiler *compiler,
const struct vkd3d_shader_instruction *instruction)
{
- uint32_t sampled_type_id, coordinate_id, dref_id, val_id, type_id;
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
const struct vkd3d_shader_dst_param *dst = instruction->dst;
const struct vkd3d_shader_src_param *src = instruction->src;
+ uint32_t sampled_type_id, coordinate_id, dref_id, val_id;
SpvImageOperandsMask operands_mask = 0;
unsigned int image_operand_count = 0;
struct vkd3d_shader_image image;
@@ -8371,10 +8371,6 @@ static void vkd3d_dxbc_compiler_emit_sample_c(struct vkd3d_dxbc_compiler *compil
sampled_type_id = vkd3d_spirv_get_type_id(builder, image.sampled_type, 1);
coordinate_id = vkd3d_dxbc_compiler_emit_load_src(compiler, &src[0], VKD3DSP_WRITEMASK_ALL);
dref_id = vkd3d_dxbc_compiler_emit_load_src(compiler, &src[3], VKD3DSP_WRITEMASK_0);
- /* XXX: Nvidia is broken and expects that the D_ref is packed together with coordinates. */
- type_id = vkd3d_spirv_get_type_id(builder, VKD3D_SHADER_COMPONENT_FLOAT, VKD3D_VEC4_SIZE);
- coordinate_id = vkd3d_spirv_build_op_composite_insert1(builder,
- type_id, dref_id, coordinate_id, image.resource_type_info->coordinate_component_count);
val_id = vkd3d_spirv_build_op_image_sample_dref(builder, op, sampled_type_id,
image.sampled_image_id, coordinate_id, dref_id, operands_mask,
image_operands, image_operand_count);
More information about the wine-cvs
mailing list