mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #15280 from unknownbrackets/samplerjit-dxt
Correct some recent regressions in samplerjit
This commit is contained in:
commit
f82f24a9bb
2 changed files with 7 additions and 3 deletions
|
@ -374,7 +374,7 @@ void ComputeSamplerID(SamplerID *id_out) {
|
|||
int bitspp = textureBitsPerPixel[gstate.getTextureFormat()];
|
||||
// We use a 16 byte minimum for all small bufws, so allow those as standard.
|
||||
int w = gstate.getTextureWidth(i);
|
||||
if (w != bufw && w * bitspp > 128)
|
||||
if (bitspp == 0 || std::max(w, 128 / bitspp) != bufw)
|
||||
id.useStandardBufw = false;
|
||||
|
||||
int h = gstate.getTextureHeight(i);
|
||||
|
|
|
@ -69,6 +69,7 @@ FetchFunc SamplerJitCache::CompileFetch(const SamplerID &id) {
|
|||
regCache_.Reset(false);
|
||||
EndWrite();
|
||||
ResetCodePtr(GetOffset(start));
|
||||
ERROR_LOG(G3D, "Failed to compile fetch %s", DescribeSamplerID(id).c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -386,6 +387,7 @@ NearestFunc SamplerJitCache::CompileNearest(const SamplerID &id) {
|
|||
regCache_.Reset(false);
|
||||
EndWrite();
|
||||
ResetCodePtr(GetOffset(start));
|
||||
ERROR_LOG(G3D, "Failed to compile nearest %s", DescribeSamplerID(id).c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -447,12 +449,13 @@ LinearFunc SamplerJitCache::CompileLinear(const SamplerID &id) {
|
|||
|
||||
// We'll first write the nearest sampler, which we will CALL.
|
||||
// This may differ slightly based on the "linear" flag.
|
||||
const u8 *nearest = AlignCode16();
|
||||
nearest = AlignCode16();
|
||||
|
||||
if (!Jit_ReadTextureFormat(id)) {
|
||||
regCache_.Reset(false);
|
||||
EndWrite();
|
||||
ResetCodePtr(GetOffset(nearest));
|
||||
ERROR_LOG(G3D, "Failed to compile linear nearest %s", DescribeSamplerID(id).c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -807,7 +810,8 @@ LinearFunc SamplerJitCache::CompileLinear(const SamplerID &id) {
|
|||
if (!success) {
|
||||
regCache_.Reset(false);
|
||||
EndWrite();
|
||||
ResetCodePtr(GetOffset(nearest));
|
||||
ResetCodePtr(GetOffset(nearest ? nearest : start));
|
||||
ERROR_LOG(G3D, "Failed to compile linear %s", DescribeSamplerID(id).c_str());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue