=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: vkd3d-shader: Remove sampler_id from struct vkd3d_shader_image.

Alexandre Julliard julliard at winehq.org
Mon Oct 22 15:26:25 CDT 2018


Module: vkd3d
Branch: master
Commit: 3efa365b5ed3d9f122be44bf886e3f6ed261fd98
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=3efa365b5ed3d9f122be44bf886e3f6ed261fd98

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Mon Oct 22 01:49:12 2018 +0200

vkd3d-shader: Remove sampler_id from struct vkd3d_shader_image.

Signed-off-by: Józef Kucia <jkucia 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 | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index 8508741..33be8de 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -5317,7 +5317,6 @@ struct vkd3d_shader_image
 {
     uint32_t id;
     uint32_t image_id;
-    uint32_t sampler_id;
     uint32_t sampled_image_id;
 
     enum vkd3d_component_type sampled_type;
@@ -5370,7 +5369,6 @@ static void vkd3d_dxbc_compiler_prepare_image(struct vkd3d_dxbc_compiler *compil
             resource_reg, image->resource_type_info, image->sampled_type,
             image->structure_stride || image->raw, depth_comparison);
 
-    image->sampler_id = 0;
     image->sampled_image_id = 0;
 }
 
@@ -5379,14 +5377,14 @@ static void vkd3d_dxbc_compiler_prepare_sampled_image_for_sampler(struct vkd3d_d
         uint32_t sampler_var_id, unsigned int flags)
 {
     struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
-    uint32_t sampled_image_type_id;
+    uint32_t sampler_id, sampled_image_type_id;
 
     vkd3d_dxbc_compiler_prepare_image(compiler, image, resource_reg, flags);
-    image->sampler_id = vkd3d_spirv_build_op_load(builder,
+    sampler_id = vkd3d_spirv_build_op_load(builder,
             vkd3d_spirv_get_op_type_sampler(builder), sampler_var_id, SpvMemoryAccessMaskNone);
     sampled_image_type_id = vkd3d_spirv_get_op_type_sampled_image(builder, image->image_type_id);
     image->sampled_image_id = vkd3d_spirv_build_op_sampled_image(builder,
-            sampled_image_type_id, image->image_id, image->sampler_id);
+            sampled_image_type_id, image->image_id, sampler_id);
 }
 
 static void vkd3d_dxbc_compiler_prepare_dummy_sampled_image(struct vkd3d_dxbc_compiler *compiler,




More information about the wine-cvs mailing list