mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
nouveau: Work around nv04-nv40 miptrees not matching nouveau_miptree.
Thanks to Bob Gleitsmann for the patch. I'll clean this up in a better way later if noone else beats me to it.
This commit is contained in:
parent
0748764351
commit
c574f515f0
10 changed files with 17 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ nv04_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
|
|||
FREE(mt);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
mt->bo = nouveau_bo(mt->buffer);
|
||||
return &mt->base;
|
||||
}
|
||||
|
||||
|
|
@ -81,6 +81,7 @@ nv04_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
|
|||
mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
|
||||
|
||||
pipe_buffer_reference(&mt->buffer, pb);
|
||||
mt->bo = nouveau_bo(mt->buffer);
|
||||
return &mt->base;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ struct nv04_rasterizer_state {
|
|||
|
||||
struct nv04_miptree {
|
||||
struct pipe_texture base;
|
||||
struct nouveau_bo *bo;
|
||||
|
||||
struct pipe_buffer *buffer;
|
||||
uint total_size;
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ nv10_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
|
|||
mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
|
||||
|
||||
pipe_buffer_reference(&mt->buffer, pb);
|
||||
mt->bo = nouveau_bo(mt->buffer);
|
||||
return &mt->base;
|
||||
}
|
||||
|
||||
|
|
@ -90,6 +91,7 @@ nv10_miptree_create(struct pipe_screen *screen, const struct pipe_texture *pt)
|
|||
FREE(mt);
|
||||
return NULL;
|
||||
}
|
||||
mt->bo = nouveau_bo(mt->buffer);
|
||||
|
||||
return &mt->base;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ struct nv10_depth_stencil_alpha_state {
|
|||
|
||||
struct nv10_miptree {
|
||||
struct pipe_texture base;
|
||||
struct nouveau_bo *bo;
|
||||
|
||||
struct pipe_buffer *buffer;
|
||||
uint total_size;
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ nv20_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
|
|||
mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
|
||||
|
||||
pipe_buffer_reference(&mt->buffer, pb);
|
||||
mt->bo = nouveau_bo(mt->buffer);
|
||||
return &mt->base;
|
||||
}
|
||||
|
||||
|
|
@ -132,6 +133,7 @@ nv20_miptree_create(struct pipe_screen *screen, const struct pipe_texture *pt)
|
|||
FREE(mt);
|
||||
return NULL;
|
||||
}
|
||||
mt->bo = nouveau_bo(mt->buffer);
|
||||
|
||||
return &mt->base;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ struct nv20_depth_stencil_alpha_state {
|
|||
|
||||
struct nv20_miptree {
|
||||
struct pipe_texture base;
|
||||
struct nouveau_bo *bo;
|
||||
|
||||
struct pipe_buffer *buffer;
|
||||
uint total_size;
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ nv30_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
|
|||
FREE(mt);
|
||||
return NULL;
|
||||
}
|
||||
mt->bo = nouveau_bo(mt->buffer);
|
||||
|
||||
return &mt->base;
|
||||
}
|
||||
|
|
@ -144,6 +145,7 @@ nv30_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
|
|||
mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;
|
||||
|
||||
pipe_buffer_reference(&mt->buffer, pb);
|
||||
mt->bo = nouveau_bo(mt->buffer);
|
||||
return &mt->base;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ struct nv30_fragment_program {
|
|||
|
||||
struct nv30_miptree {
|
||||
struct pipe_texture base;
|
||||
struct nouveau_bo *bo;
|
||||
|
||||
struct pipe_buffer *buffer;
|
||||
uint total_size;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include "nv40_context.h"
|
||||
|
||||
|
||||
|
||||
static void
|
||||
nv40_miptree_layout(struct nv40_miptree *mt)
|
||||
{
|
||||
|
|
@ -109,7 +111,7 @@ nv40_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
|
|||
FREE(mt);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
mt->bo = nouveau_bo(mt->buffer);
|
||||
return &mt->base;
|
||||
}
|
||||
|
||||
|
|
@ -138,6 +140,7 @@ nv40_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
|
|||
mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;
|
||||
|
||||
pipe_buffer_reference(&mt->buffer, pb);
|
||||
mt->bo = nouveau_bo(mt->buffer);
|
||||
return &mt->base;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ struct nv40_fragment_program {
|
|||
|
||||
struct nv40_miptree {
|
||||
struct pipe_texture base;
|
||||
struct nouveau_bo *bo;
|
||||
|
||||
struct pipe_buffer *buffer;
|
||||
uint total_size;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue