diff options
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_context.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_context.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_context.cpp b/src/shader_recompiler/backend/spirv/emit_context.cpp index 50793b5bf..c2d13f97c 100644 --- a/src/shader_recompiler/backend/spirv/emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/emit_context.cpp | |||
| @@ -244,8 +244,9 @@ void EmitContext::DefineTextures(const Info& info, u32& binding) { | |||
| 244 | if (desc.count != 1) { | 244 | if (desc.count != 1) { |
| 245 | throw NotImplementedException("Array of textures"); | 245 | throw NotImplementedException("Array of textures"); |
| 246 | } | 246 | } |
| 247 | const Id type{TypeSampledImage(ImageType(*this, desc))}; | 247 | const Id image_type{ImageType(*this, desc)}; |
| 248 | const Id pointer_type{TypePointer(spv::StorageClass::UniformConstant, type)}; | 248 | const Id sampled_type{TypeSampledImage(image_type)}; |
| 249 | const Id pointer_type{TypePointer(spv::StorageClass::UniformConstant, sampled_type)}; | ||
| 249 | const Id id{AddGlobalVariable(pointer_type, spv::StorageClass::UniformConstant)}; | 250 | const Id id{AddGlobalVariable(pointer_type, spv::StorageClass::UniformConstant)}; |
| 250 | Decorate(id, spv::Decoration::Binding, binding); | 251 | Decorate(id, spv::Decoration::Binding, binding); |
| 251 | Decorate(id, spv::Decoration::DescriptorSet, 0U); | 252 | Decorate(id, spv::Decoration::DescriptorSet, 0U); |
| @@ -254,7 +255,8 @@ void EmitContext::DefineTextures(const Info& info, u32& binding) { | |||
| 254 | // TODO: Pass count info | 255 | // TODO: Pass count info |
| 255 | textures.push_back(TextureDefinition{ | 256 | textures.push_back(TextureDefinition{ |
| 256 | .id{id}, | 257 | .id{id}, |
| 257 | .type{type}, | 258 | .sampled_type{sampled_type}, |
| 259 | .image_type{image_type}, | ||
| 258 | }); | 260 | }); |
| 259 | } | 261 | } |
| 260 | binding += desc.count; | 262 | binding += desc.count; |