mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-23 11:55:00 +00:00
shader_recompiler: Fix some image view type issues. (#2118)
This commit is contained in:
parent
562ed2a025
commit
e656093d85
7 changed files with 30 additions and 22 deletions
|
@ -773,7 +773,7 @@ spv::ImageFormat GetFormat(const AmdGpu::Image& image) {
|
|||
Id ImageType(EmitContext& ctx, const ImageResource& desc, Id sampled_type) {
|
||||
const auto image = desc.GetSharp(ctx.info);
|
||||
const auto format = desc.is_atomic ? GetFormat(image) : spv::ImageFormat::Unknown;
|
||||
const auto type = image.GetBoundType(desc.is_array);
|
||||
const auto type = image.GetViewType(desc.is_array);
|
||||
const u32 sampled = desc.is_written ? 2 : 1;
|
||||
switch (type) {
|
||||
case AmdGpu::ImageType::Color1D:
|
||||
|
@ -814,7 +814,7 @@ void EmitContext::DefineImagesAndSamplers() {
|
|||
.sampled_type = is_storage ? sampled_type : TypeSampledImage(image_type),
|
||||
.pointer_type = pointer_type,
|
||||
.image_type = image_type,
|
||||
.bound_type = sharp.GetBoundType(image_desc.is_array),
|
||||
.view_type = sharp.GetViewType(image_desc.is_array),
|
||||
.is_integer = is_integer,
|
||||
.is_storage = is_storage,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue