KhronosGroup / OpenGL-API

OpenGL and OpenGL ES API Issue Tracker
34 stars 5 forks source link

Error in GLES 3.1: The mag filter can not be NEAREST_MIPMAP_NEAREST for stencil texture #33

Closed Richard-Yunchao closed 6 years ago

Richard-Yunchao commented 6 years ago

The statement in GLES 3.1 spec on page 190, section 8.16 : • The internal format of the texture is DEPTHSTENCIL, the value of DEPTH- STENCIL_TEXTURE_MODE for the texture is STENCIL_INDEX and either the magnification filter or the minification filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST.

It means that NEAREST_MIPMAP_NEAREST for magnification filter is allowed according to this statement. However, this is not true. There are two reasons:

  1. NEAREST_MIPMAP_NEAREST is not allowed for magnification filter at all, see the legal values for TexParameter for mag filter at Table 8.20 on page 174 at section 8.9 in GLES 3.1 spec.
  2. GLES 3.2 spec and GL 4.5 spec differs from GLES 3.1 spec about this.

So I think the statement should be: • The internal format of the texture is DEPTHSTENCIL, the value of DEPTH- STENCIL_TEXTURE_MODE for the texture is STENCIL_INDEX and either the magnification filter is not NEAREST or the minification filter is neither NEAREST nor NEAREST_MIPMAP_NEAREST.

BTW, I know that you would not revise the errors in GLES 3.1 spec. But I would like to raise it as a reference for other projects. PTAL and acknowledge it if you have time.

pdaniell-nv commented 6 years ago

Touched on in the OpenGL ES meeting today. We agree this language has an issue and has been fixed in OpenGL ES 3.2. We don't plan to update the OpenGL ES 3.1 spec. Please close if this is satisfactory. Thanks for the issue.

Richard-Yunchao commented 6 years ago

Thanks for your acknowledge, @pdaniell-nv . Closing.