mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-29 18:56:22 +00:00
[spir-v, emit] SPV Image Missmatch
This commit is contained in:
committed by
Caio Oliveira
parent
cf37a68e07
commit
e56accf146
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -541,9 +544,19 @@ Id EmitImageFetch(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, Id c
|
|||||||
// This image is multisampled, lod must be implicit
|
// This image is multisampled, lod must be implicit
|
||||||
lod = Id{};
|
lod = Id{};
|
||||||
}
|
}
|
||||||
|
const bool is_integer_fetch = info.type == TextureType::Buffer
|
||||||
|
? false
|
||||||
|
: ctx.textures.at(info.descriptor_index).is_integer;
|
||||||
const ImageOperands operands(lod, ms);
|
const ImageOperands operands(lod, ms);
|
||||||
return Emit(&EmitContext::OpImageSparseFetch, &EmitContext::OpImageFetch, ctx, inst, ctx.F32[4],
|
const Id image = TextureImage(ctx, info, index);
|
||||||
TextureImage(ctx, info, index), coords, operands.MaskOptional(), operands.Span());
|
const Id result_type = is_integer_fetch ? ctx.U32[4] : ctx.F32[4];
|
||||||
|
const Id sample =
|
||||||
|
Emit(&EmitContext::OpImageSparseFetch, &EmitContext::OpImageFetch, ctx, inst, result_type,
|
||||||
|
image, coords, operands.MaskOptional(), operands.Span());
|
||||||
|
if (!is_integer_fetch) {
|
||||||
|
return sample;
|
||||||
|
}
|
||||||
|
return ctx.OpBitcast(ctx.F32[4], sample);
|
||||||
}
|
}
|
||||||
|
|
||||||
Id EmitImageQueryDimensions(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, Id lod,
|
Id EmitImageQueryDimensions(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, Id lod,
|
||||||
|
|||||||
Reference in New Issue
Block a user