diff options
Diffstat (limited to 'src')
3 files changed, 2 insertions, 6 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp index 34240b36f..8decdf399 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp | |||
| @@ -204,9 +204,7 @@ Id TextureImage(EmitContext& ctx, IR::TextureInstInfo info, const IR::Value& ind | |||
| 204 | if (def.count > 1) { | 204 | if (def.count > 1) { |
| 205 | throw NotImplementedException("Indirect texture sample"); | 205 | throw NotImplementedException("Indirect texture sample"); |
| 206 | } | 206 | } |
| 207 | const Id sampler_id{def.id}; | 207 | return ctx.OpLoad(ctx.image_buffer_type, def.id); |
| 208 | const Id id{ctx.OpLoad(ctx.sampled_texture_buffer_type, sampler_id)}; | ||
| 209 | return ctx.OpImage(ctx.image_buffer_type, id); | ||
| 210 | } else { | 208 | } else { |
| 211 | const TextureDefinition& def{ctx.textures.at(info.descriptor_index)}; | 209 | const TextureDefinition& def{ctx.textures.at(info.descriptor_index)}; |
| 212 | if (def.count > 1) { | 210 | if (def.count > 1) { |
diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp index 238fb40e3..72f69b7aa 100644 --- a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp | |||
| @@ -1247,9 +1247,8 @@ void EmitContext::DefineTextureBuffers(const Info& info, u32& binding) { | |||
| 1247 | } | 1247 | } |
| 1248 | const spv::ImageFormat format{spv::ImageFormat::Unknown}; | 1248 | const spv::ImageFormat format{spv::ImageFormat::Unknown}; |
| 1249 | image_buffer_type = TypeImage(F32[1], spv::Dim::Buffer, 0U, false, false, 1, format); | 1249 | image_buffer_type = TypeImage(F32[1], spv::Dim::Buffer, 0U, false, false, 1, format); |
| 1250 | sampled_texture_buffer_type = TypeSampledImage(image_buffer_type); | ||
| 1251 | 1250 | ||
| 1252 | const Id type{TypePointer(spv::StorageClass::UniformConstant, sampled_texture_buffer_type)}; | 1251 | const Id type{TypePointer(spv::StorageClass::UniformConstant, image_buffer_type)}; |
| 1253 | texture_buffers.reserve(info.texture_buffer_descriptors.size()); | 1252 | texture_buffers.reserve(info.texture_buffer_descriptors.size()); |
| 1254 | for (const TextureBufferDescriptor& desc : info.texture_buffer_descriptors) { | 1253 | for (const TextureBufferDescriptor& desc : info.texture_buffer_descriptors) { |
| 1255 | if (desc.count != 1) { | 1254 | if (desc.count != 1) { |
diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.h b/src/shader_recompiler/backend/spirv/spirv_emit_context.h index e63330f11..7c49fd504 100644 --- a/src/shader_recompiler/backend/spirv/spirv_emit_context.h +++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.h | |||
| @@ -206,7 +206,6 @@ public: | |||
| 206 | Id output_u32{}; | 206 | Id output_u32{}; |
| 207 | 207 | ||
| 208 | Id image_buffer_type{}; | 208 | Id image_buffer_type{}; |
| 209 | Id sampled_texture_buffer_type{}; | ||
| 210 | Id image_u32{}; | 209 | Id image_u32{}; |
| 211 | 210 | ||
| 212 | std::array<UniformDefinitions, Info::MAX_CBUFS> cbufs{}; | 211 | std::array<UniformDefinitions, Info::MAX_CBUFS> cbufs{}; |