mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 05:58:05 +02:00
mesa: Create the default (name==0) buffer texture.
All that should be needed is that it exists. Fixes segfaults on first _mesa_update_context() with a samplerBuffer-using shader active but without a particular buffer texture enabled. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
bb430ced7f
commit
18c2ee0df5
1 changed files with 5 additions and 0 deletions
|
|
@ -756,6 +756,9 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex)
|
|||
target = GL_TEXTURE_1D;
|
||||
break;
|
||||
case TEXTURE_BUFFER_INDEX:
|
||||
dims = 0;
|
||||
target = GL_TEXTURE_BUFFER;
|
||||
break;
|
||||
case TEXTURE_EXTERNAL_INDEX:
|
||||
default:
|
||||
/* no-op */
|
||||
|
|
@ -794,6 +797,8 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex)
|
|||
GL_RGBA, texFormat);
|
||||
|
||||
switch (dims) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
ctx->Driver.TexImage1D(ctx, texImage, GL_RGBA,
|
||||
width, 0,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue