GPU/HW: Fix batch shader compiling with GLSL ES

This commit is contained in:
Stenzek 2024-10-01 21:14:58 +10:00
parent 45c8f6ea56
commit 0730a361a3
No known key found for this signature in database
2 changed files with 5 additions and 3 deletions

View File

@ -841,7 +841,7 @@ float4 SampleFromVRAM(TEXPAGE_VALUE texpage, float2 coords)
#endif
// load colour/palette
float4 texel = SAMPLE_TEXTURE_LEVEL(samp0, float2(vicoord) * RCP_VRAM_SIZE, 0);
float4 texel = SAMPLE_TEXTURE_LEVEL(samp0, float2(vicoord) * RCP_VRAM_SIZE, 0.0);
uint vram_value = RGBA8ToRGBA5551(texel);
// apply palette
@ -856,7 +856,7 @@ float4 SampleFromVRAM(TEXPAGE_VALUE texpage, float2 coords)
uint2 palette_icoord = uint2(((texpage.z + palette_index) & 0x3FFu), texpage.w);
#endif
return SAMPLE_TEXTURE_LEVEL(samp0, float2(palette_icoord) * RCP_VRAM_SIZE, 0);
return SAMPLE_TEXTURE_LEVEL(samp0, float2(palette_icoord) * RCP_VRAM_SIZE, 0.0);
#else
// Direct texturing - usually render-to-texture effects.
#if !UPSCALED
@ -872,7 +872,7 @@ float4 SampleFromVRAM(TEXPAGE_VALUE texpage, float2 coords)
uint2 nicoord = ApplyTextureWindow(uint2(floor(ncoords)));
uint2 nvicoord = (texpage.xy + nicoord) & uint2(1023, 511);
ncoords = (float2(nvicoord) + nfpart);
return SAMPLE_TEXTURE_LEVEL(samp0, ncoords * RCP_VRAM_SIZE, 0);
return SAMPLE_TEXTURE_LEVEL(samp0, ncoords * RCP_VRAM_SIZE, 0.0);
#endif
#endif
}

View File

@ -23,7 +23,9 @@
#include "IconsEmoji.h"
#ifndef XXH_STATIC_LINKING_ONLY
#define XXH_STATIC_LINKING_ONLY
#endif
#include "xxhash.h"
#ifdef CPU_ARCH_SSE
#include "xxh_x86dispatch.h"