diff options
author | Erik Faye-Lund <[email protected]> | 2019-07-15 12:03:43 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-10-09 09:56:00 +0200 |
commit | bbdbb02a5fc16dfd9bc4ff3142c3177e2051b87e (patch) | |
tree | 488d458e4fb0f972f55c142c8803fd4a072ed01b /src/mesa/main/dlist.c | |
parent | f92226931b90c005eace6dd9cb675c83b1e58cb0 (diff) |
mesa/main: prefer R8-textures instead of A8 for glBitmap in display lists
This allows drivers to communicate that they prefer R8 textures rather
than A8 for glBitmap usage.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r-- | src/mesa/main/dlist.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 708c25f004e..622fb805660 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -941,9 +941,14 @@ build_bitmap_atlas(struct gl_context *ctx, struct gl_bitmap_atlas *atlas, goto out_of_memory; } - _mesa_init_teximage_fields(ctx, atlas->texImage, - atlas->texWidth, atlas->texHeight, 1, 0, - GL_ALPHA, MESA_FORMAT_A_UNORM8); + if (ctx->Const.BitmapUsesRed) + _mesa_init_teximage_fields(ctx, atlas->texImage, + atlas->texWidth, atlas->texHeight, 1, 0, + GL_RED, MESA_FORMAT_R_UNORM8); + else + _mesa_init_teximage_fields(ctx, atlas->texImage, + atlas->texWidth, atlas->texHeight, 1, 0, + GL_ALPHA, MESA_FORMAT_A_UNORM8); /* alloc image storage */ if (!ctx->Driver.AllocTextureImageBuffer(ctx, atlas->texImage)) { |