Temporary workarounds for Amplitude 2016
This commit is contained in:
parent
42c4d8353a
commit
ece821820d
|
@ -425,6 +425,14 @@ spv::ImageFormat GetFormat(const AmdGpu::Image& image) {
|
||||||
image.GetNumberFmt() == AmdGpu::NumberFormat::Unorm) {
|
image.GetNumberFmt() == AmdGpu::NumberFormat::Unorm) {
|
||||||
return spv::ImageFormat::Rgba8;
|
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 &&
|
if (image.GetDataFmt() == AmdGpu::DataFormat::Format8_8_8_8 &&
|
||||||
image.GetNumberFmt() == AmdGpu::NumberFormat::Uint) {
|
image.GetNumberFmt() == AmdGpu::NumberFormat::Uint) {
|
||||||
return spv::ImageFormat::Rgba8ui;
|
return spv::ImageFormat::Rgba8ui;
|
||||||
|
|
|
@ -162,18 +162,22 @@ void Translator::S_BARRIER() {
|
||||||
ir.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) {
|
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]));
|
SetDst(inst.dst[0], GetSrc(inst.src[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Translator::V_READLANE_B32(const GcnInst& inst) {
|
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]));
|
SetDst(inst.dst[0], GetSrc(inst.src[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Translator::V_WRITELANE_B32(const GcnInst& inst) {
|
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]));
|
SetDst(inst.dst[0], GetSrc(inst.src[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue