mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
Merge pull request #17332 from hrydgard/socom-texcoord-issue
Fix texcoord issue with SOCOM post effect
This commit is contained in:
3 files changed
+11
-5
No files matched your search
@@ -2613,7 +2613,7 @@ static SceUID sceKernelLoadModuleBufferUsbWlan(u32 size, u32 bufPtr, u32 flags,
|
||||
|
||||
static u32 sceKernelQueryModuleInfo(u32 uid, u32 infoAddr)
|
||||
{
|
||||
INFO_LOG(SCEMODULE, "sceKernelQueryModuleInfo(%i, %08x)", uid, infoAddr);
|
||||
DEBUG_LOG(SCEMODULE, "sceKernelQueryModuleInfo(%i, %08x)", uid, infoAddr);
|
||||
u32 error;
|
||||
PSPModule *module = kernelObjects.Get<PSPModule>(uid, error);
|
||||
if (!module)
|
||||
|
||||
@@ -249,7 +249,8 @@ void GenerateDepalShaderFloat(ShaderWriter &writer, const DepalConfig &config) {
|
||||
break;
|
||||
case GE_FORMAT_5551:
|
||||
if (config.textureFormat == GE_TFMT_CLUT8 && mask == 0xFF && shift == 0) {
|
||||
sprintf(lookupMethod, "(index.a * 128.0 + index.b * 64.0 + index.g * 4.0)"); // we just skip A.
|
||||
// Follow the intent here, and ignore g (and let's not round unnecessarily).
|
||||
sprintf(lookupMethod, "floor(floor(index.a) * 128.0 + index.b * 64.0)"); // we just skip A.
|
||||
index_multiplier = 1.0f / 256.0f;
|
||||
// SOCOM case. #16210
|
||||
} else if ((mask & (mask + 1)) == 0 && shift < 16) {
|
||||
@@ -373,7 +374,12 @@ void GenerateDepalFs(ShaderWriter &writer, const DepalConfig &config) {
|
||||
case GLSL_VULKAN:
|
||||
case GLSL_3xx:
|
||||
case HLSL_D3D11:
|
||||
GenerateDepalShader300(writer, config);
|
||||
// Use the float shader for the SOCOM special.
|
||||
if (config.bufferFormat == GE_FORMAT_5551 && config.textureFormat == GE_TFMT_CLUT8) {
|
||||
GenerateDepalShaderFloat(writer, config);
|
||||
} else {
|
||||
GenerateDepalShader300(writer, config);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_assert_msg_(false, "Shader language not supported for depal: %d", (int)writer.Lang().shaderLanguage);
|
||||
|
||||
@@ -2315,9 +2315,9 @@ void TextureCacheCommon::ApplyTextureFramebuffer(VirtualFramebuffer *framebuffer
|
||||
bool needsDepthXSwizzle = depthUpperBits == 2;
|
||||
|
||||
int depalWidth = framebuffer->renderWidth;
|
||||
int texWidth = framebuffer->width;
|
||||
int texWidth = framebuffer->bufferWidth;
|
||||
if (needsDepthXSwizzle) {
|
||||
texWidth = RoundUpToPowerOf2(framebuffer->width);
|
||||
texWidth = RoundUpToPowerOf2(framebuffer->bufferWidth);
|
||||
depalWidth = texWidth * framebuffer->renderScaleFactor;
|
||||
gstate_c.Dirty(DIRTY_UVSCALEOFFSET);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user