b58c2216
by Francisco Casas at 2026-06-02T20:47:07+02:00
wined3d: Don't use texelFetchOffset() for buffers and multi-sample textures.
The TexelFetchOffset() GLSL function is not defined for sampler2DMS,
sampler2DMSArray and samplerBuffer, so we get the following
wined3d_debug_callback errors when emiting them:
"0:56(9): error: no matching function for call to `texelFetchOffset(sampler2DMS, ivec2, int, ivec2)'; candidates are:".
"0:56(9): error: vec4 texelFetchOffset(sampler1D, int, int, int)".
...
"0:56(9): error: uvec4 texelFetchOffset(usampler2DArray, ivec3, int, ivec2)".
"0:56(9): error: type mismatch".
This happens when wined3d is used to run Dishonored 2.
To fix this, we emit TexelOffset() for these samplers instead, and just
add (+) the offset to the position parameter.