diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-03-26 22:45:38 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:24 +0200 |
commit | 17063d16a3cfe6542e74265739191e1d018fc456 (patch) | |
tree | 3dc74c85c9be19183f4c889306458c9a6307b108 /src/shader_recompiler/backend/spirv/emit_context.cpp | |
parent | shader: Refactor PTP and other minor changes (diff) | |
download | yuzu-17063d16a3cfe6542e74265739191e1d018fc456.tar yuzu-17063d16a3cfe6542e74265739191e1d018fc456.tar.gz yuzu-17063d16a3cfe6542e74265739191e1d018fc456.tar.bz2 yuzu-17063d16a3cfe6542e74265739191e1d018fc456.tar.lz yuzu-17063d16a3cfe6542e74265739191e1d018fc456.tar.xz yuzu-17063d16a3cfe6542e74265739191e1d018fc456.tar.zst yuzu-17063d16a3cfe6542e74265739191e1d018fc456.zip |
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) { if (desc.count != 1) { throw NotImplementedException("Array of textures"); } - const Id type{TypeSampledImage(ImageType(*this, desc))}; - const Id pointer_type{TypePointer(spv::StorageClass::UniformConstant, type)}; + const Id image_type{ImageType(*this, desc)}; + const Id sampled_type{TypeSampledImage(image_type)}; + const Id pointer_type{TypePointer(spv::StorageClass::UniformConstant, sampled_type)}; const Id id{AddGlobalVariable(pointer_type, spv::StorageClass::UniformConstant)}; Decorate(id, spv::Decoration::Binding, binding); Decorate(id, spv::Decoration::DescriptorSet, 0U); @@ -254,7 +255,8 @@ void EmitContext::DefineTextures(const Info& info, u32& binding) { // TODO: Pass count info textures.push_back(TextureDefinition{ .id{id}, - .type{type}, + .sampled_type{sampled_type}, + .image_type{image_type}, }); } binding += desc.count; |