Apple Silicon (M2): "unit 0 GLD_TEXTURE_INDEX_2D is unloadable" - shader renders black

Hi all!

So after some tinkering I got the shader compiler to run on my M2 MPB. I have a simple shader that draws a glow-border around a texture. I use a texture sampler for this, like so

SamplerState SpriteTextureSampler : register(s0) = sampler_state
{
    Texture = <SpriteTexture>;
};

When running the game all textures drawn using this effect are black and the following error message is printed to console:

POSSIBLE ISSUE: unit 0 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable

I found some postings here and there about that specific message when using OpenGL on Apple Silicon, but my knowledge of shaders and rendering systems is not enough to know how to apply some of the “fixes” that are mentioned.

For me it sounds like a problem that is introduced during translation of HLSL to GLSL.

Does anybody have any idea how this could be fixed? Or has anybody found a workaround for this issue?

1 Like

Hi! I’m experiencing the same issue… Were you able to find a fix?