diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 5bcc701393..e52176a9b1 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -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(uid, error); if (!module) diff --git a/GPU/Common/DepalettizeShaderCommon.cpp b/GPU/Common/DepalettizeShaderCommon.cpp index f37443cec7..8bba36521d 100644 --- a/GPU/Common/DepalettizeShaderCommon.cpp +++ b/GPU/Common/DepalettizeShaderCommon.cpp @@ -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); diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index e483248e7f..aecd7c470d 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -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); }