Texture sampling with varying coordinates only working in wireframe mode?????

#version 460
#extension GL_ARB_bindless_texture : require

in flat sampler2D text;
in vec2 texCoord;

out vec4 col;

void main() {
    col = texture(text, texCoord);

    if (col.a == 0) {
        discard;
    }
}

This is absolutely ridiculous. I am sampling a texture in my frag shader using tex coords passed from the vertex shader, like everybody does. When I use texture() or texelFetch() with the varying tex coords, it always returns vec4(0). However, when I hard-code tex coords to be used, it works fine. And, the even stranger part, the varying tex coords work fine when the polygon mode is GL_LINE (wireframe). I am using an identical rendering setup to some mesh code that works totally fine. Here's my frag shader.