[Fix] (DirectGLES): forward an integer border colour through glTexParameterIiv/glSamplerParameterIiv instead of flattening it to float

This commit is contained in:
2026-08-27 08:35:01 -04:00
parent 764b6e044d
commit a94b3e0bd5
2 changed files with 64 additions and 12 deletions
@@ -1051,6 +1051,10 @@ namespace MobileGL::MG_Backend::DirectGLES {
SamplerParameters m_cacheSamplerParameters;
UintVec2 m_cacheLodRange = {0, 1000};
FloatVec4 m_cacheBorderColor = {0.0f, 0.0f, 0.0f, 0.0f};
// Which border-colour entry point the driver texture last received. Cached beside the
// value because a Float -> Int transition can leave the numbers unchanged (the derived
// representations are kept in step) while still needing a different driver call.
BorderColorForm m_cacheBorderColorForm = BorderColorForm::Float;
Vec4<TextureSwizzleParam> m_cacheSwizzleParams = {TextureSwizzleParam::Red, TextureSwizzleParam::Green,
TextureSwizzleParam::Blue, TextureSwizzleParam::Alpha};
// GL_DEPTH_STENCIL_TEXTURE_MODE. GL_DEPTH_COMPONENT is the GL and ES default, so a