mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02:00
mesa: fix glBitmap in display lists when width <= 0 || height <= 0
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8904 Fixes:bb860f63- mesa: create glBitmap textures while creating display lists Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23335> (cherry picked from commitbac1c88ea3)
This commit is contained in:
parent
a1a71c0857
commit
c2f0fd28ac
2 changed files with 9 additions and 6 deletions
|
|
@ -3325,7 +3325,7 @@
|
|||
"description": "mesa: fix glBitmap in display lists when width <= 0 || height <= 0",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "bb860f63f6df60a00c5a97df4cb98a2e0850d3aa"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1345,12 +1345,15 @@ save_Bitmap(GLsizei width, GLsizei height,
|
|||
GET_CURRENT_CONTEXT(ctx);
|
||||
Node *n;
|
||||
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
|
||||
struct pipe_resource *tex =
|
||||
st_make_bitmap_texture(ctx, width, height, &ctx->Unpack, pixels);
|
||||
struct pipe_resource *tex = NULL;
|
||||
|
||||
if (!tex) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glNewList -> glBitmap");
|
||||
return;
|
||||
if (width > 0 && height > 0) {
|
||||
tex = st_make_bitmap_texture(ctx, width, height, &ctx->Unpack, pixels);
|
||||
|
||||
if (!tex) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glNewList -> glBitmap");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
n = alloc_instruction(ctx, OPCODE_BITMAP, 6 + POINTER_DWORDS);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue