Merge c7fd36cf0e
into 32cb3649d3
This commit is contained in:
commit
8e27c24801
|
@ -425,6 +425,14 @@ spv::ImageFormat GetFormat(const AmdGpu::Image& image) {
|
|||
image.GetNumberFmt() == AmdGpu::NumberFormat::Unorm) {
|
||||
return spv::ImageFormat::Rgba8;
|
||||
}
|
||||
if (image.GetDataFmt() == AmdGpu::DataFormat::Format8_8_8_8 &&
|
||||
image.GetNumberFmt() == AmdGpu::NumberFormat::Srgb) {
|
||||
// TEMP: for Amplitude 2016
|
||||
// The game requests a Format8_8_8_8 SRGB image format.
|
||||
// Interpreting it as R16Snorm makes the game draw with no major color deviations.
|
||||
// What should the SRGB format be?
|
||||
return spv::ImageFormat::R16Snorm;
|
||||
}
|
||||
if (image.GetDataFmt() == AmdGpu::DataFormat::Format8_8_8_8 &&
|
||||
image.GetNumberFmt() == AmdGpu::NumberFormat::Uint) {
|
||||
return spv::ImageFormat::Rgba8ui;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
namespace Shader::Gcn {
|
||||
|
||||
u32 GcnInst::BranchTarget(u32 pc) const {
|
||||
const s16 simm = static_cast<s16>(control.sopp.simm * 4);
|
||||
const s32 simm = static_cast<s32>(control.sopp.simm) * 4;
|
||||
const u32 target = pc + simm + 4;
|
||||
return target;
|
||||
}
|
||||
|
|
|
@ -162,18 +162,22 @@ void Translator::S_BARRIER() {
|
|||
ir.Barrier();
|
||||
}
|
||||
|
||||
// TEMP: for Amplitude 2016
|
||||
// These are "warp instructions" and are stubbed to work outside of compute shaders.
|
||||
// The game makes use of them and works fine when the assertions are removed.
|
||||
|
||||
void Translator::V_READFIRSTLANE_B32(const GcnInst& inst) {
|
||||
ASSERT(info.stage != Stage::Compute);
|
||||
//ASSERT(info.stage != Stage::Compute);
|
||||
SetDst(inst.dst[0], GetSrc(inst.src[0]));
|
||||
}
|
||||
|
||||
void Translator::V_READLANE_B32(const GcnInst& inst) {
|
||||
ASSERT(info.stage != Stage::Compute);
|
||||
//ASSERT(info.stage != Stage::Compute);
|
||||
SetDst(inst.dst[0], GetSrc(inst.src[0]));
|
||||
}
|
||||
|
||||
void Translator::V_WRITELANE_B32(const GcnInst& inst) {
|
||||
ASSERT(info.stage != Stage::Compute);
|
||||
//ASSERT(info.stage != Stage::Compute);
|
||||
SetDst(inst.dst[0], GetSrc(inst.src[0]));
|
||||
}
|
||||
|
||||
|
|
|
@ -327,6 +327,13 @@ std::unique_ptr<ComputePipeline> PipelineCache::CreateComputePipeline() {
|
|||
MakeShaderInfo(Shader::Stage::Compute, cs_pgm.user_data, liverpool->regs);
|
||||
info.pgm_base = cs_pgm.Address<uintptr_t>();
|
||||
info.pgm_hash = compute_key;
|
||||
|
||||
// TEMP: for Amplitude 2016:
|
||||
// Skip broken shader with V_MOVREL... instructions:
|
||||
if (compute_key == 0xc7f34c4f) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto program =
|
||||
Shader::TranslateProgram(inst_pool, block_pool, code, std::move(info), profile);
|
||||
|
||||
|
|
Loading…
Reference in New Issue