Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify a MIN_FILTER for render target textures #220

Closed
wants to merge 1 commit into from

Commits on Sep 6, 2018

  1. Specify a MIN_FILTER for render target textures

    Previously when rendering with Swiftshader, enabling the postprocessing
    pipeline would result in nothing being rendered to the screen.
    
    I narrowed down the issue due to Swiftshader not considering the
    postProcess_colorBuffer sampler as complete.  This occurs because the
    default min filter for textures is GL_NEAREST_MIPMAP_LINEAR, which
    requires mipmaps, and the render target texture doesn't include those,
    so Swiftshader doesn't consider the texture to be complete when it's
    binding it to a sampler, resulting in it failing to bind.
    
    The OpenGL ES 3.1 spec is vague around this area, see section 8.16.1,
    which states that if the sampler min filter requires mipmaps and the
    texture doesn't include them the sampler may be considered incomplete,
    but it doesn't say what happens if the texture is incomplete by itself
    and complete after the sampler min filter overrides the texture min
    filter.
    
    Since the language is vague, and the current behavior is arguably
    incorrect, update OpenGLDriver::textureStorage to explicitly specify a
    min filter so that render target textures are considered complete
    standalone.
    Jeff McGlynn committed Sep 6, 2018
    Configuration menu
    Copy the full SHA
    c73f699 View commit details
    Browse the repository at this point in the history