On Sat, Aug 5, 2017 at 11:39 AM, Chris Wilson <ch...@chris-wilson.co.uk> wrote:
> Map the user format of GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE to the
> internal format of MESA_FORMAT_S_UINT8.
> ---
>  src/mesa/main/glformats.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
> index 06be3ec48d..8ae833ca65 100644
> --- a/src/mesa/main/glformats.c
> +++ b/src/mesa/main/glformats.c
> @@ -3472,6 +3472,10 @@ _mesa_format_from_format_and_type(GLenum format, 
> GLenum type)
>      * matching the OpenGL format and data type
>      */
>     switch (type) {
> +   case GL_UNSIGNED_BYTE:
> +      if (format == GL_STENCIL_INDEX)
> +         return MESA_FORMAT_S_UINT8;
> +      break;

The commit message says "GL_DEPTH_COMPONENT", but the code says
"GL_STENCIL_INDEX". I'm guessing the latter is the intended.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to