mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-23 11:55:00 +00:00
shader_recompiler: Sample images using correct result type. (#1068)
This commit is contained in:
parent
11c155d0f1
commit
45e206e248
3 changed files with 33 additions and 15 deletions
|
@ -532,6 +532,8 @@ Id ImageType(EmitContext& ctx, const ImageResource& desc, Id sampled_type) {
|
|||
|
||||
void EmitContext::DefineImagesAndSamplers() {
|
||||
for (const auto& image_desc : info.images) {
|
||||
const bool is_integer = image_desc.nfmt == AmdGpu::NumberFormat::Uint ||
|
||||
image_desc.nfmt == AmdGpu::NumberFormat::Sint;
|
||||
const VectorIds& data_types = GetAttributeType(*this, image_desc.nfmt);
|
||||
const Id sampled_type = data_types[1];
|
||||
const Id image_type{ImageType(*this, image_desc, sampled_type)};
|
||||
|
@ -547,6 +549,7 @@ void EmitContext::DefineImagesAndSamplers() {
|
|||
.sampled_type = image_desc.is_storage ? sampled_type : TypeSampledImage(image_type),
|
||||
.pointer_type = pointer_type,
|
||||
.image_type = image_type,
|
||||
.is_integer = is_integer,
|
||||
.is_storage = image_desc.is_storage,
|
||||
});
|
||||
interfaces.push_back(id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue