* [PATCH] nouveau_vieux: add AllocTextureImageBuffer implementation
@ 2013-10-04 8:28 Ilia Mirkin
[not found] ` <1380875338-25572-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Ilia Mirkin @ 2013-10-04 8:28 UTC (permalink / raw)
To: Francisco Jerez; +Cc: mesa-dev, nouveau
This fixes issues where get_rt_format would see a 0 format because the
nouveau_surface had not been properly initialized. Fixes crash on
supertuxkart startup (which still fails due to out-of-vram issues).
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
---
src/mesa/drivers/dri/nouveau/nouveau_texture.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index da74e8f..8904389 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -494,6 +494,14 @@ nouveau_compressed_teximage(struct gl_context *ctx, GLuint dims,
&ctx->Unpack, GL_TRUE);
}
+static GLboolean
+nouveau_teximage_alloc(struct gl_context *ctx, struct gl_texture_image *ti)
+{
+ nouveau_teximage(ctx, 3, ti, 0, 0, 0, NULL,
+ &ctx->DefaultPacking, GL_FALSE);
+ return GL_TRUE;
+}
+
static void
nouveau_texsubimage(struct gl_context *ctx, GLint dims,
struct gl_texture_image *ti,
@@ -634,6 +642,7 @@ nouveau_texture_functions_init(struct dd_function_table *functions)
functions->DeleteTexture = nouveau_texture_free;
functions->NewTextureImage = nouveau_teximage_new;
functions->FreeTextureImageBuffer = nouveau_teximage_free;
+ functions->AllocTextureImageBuffer = nouveau_teximage_alloc;
functions->ChooseTextureFormat = nouveau_choose_tex_format;
functions->TexImage = nouveau_teximage_123d;
functions->TexSubImage = nouveau_texsubimage_123d;
--
1.8.1.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nouveau_vieux: add AllocTextureImageBuffer implementation
[not found] ` <1380875338-25572-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
@ 2013-10-06 20:31 ` Francisco Jerez
0 siblings, 0 replies; 2+ messages in thread
From: Francisco Jerez @ 2013-10-06 20:31 UTC (permalink / raw)
To: Ilia Mirkin
Cc: mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1.1: Type: text/plain, Size: 1750 bytes --]
Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> writes:
> This fixes issues where get_rt_format would see a 0 format because the
> nouveau_surface had not been properly initialized. Fixes crash on
> supertuxkart startup (which still fails due to out-of-vram issues).
>
> Signed-off-by: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Thanks, pushed.
> src/mesa/drivers/dri/nouveau/nouveau_texture.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
> index da74e8f..8904389 100644
> --- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
> +++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
> @@ -494,6 +494,14 @@ nouveau_compressed_teximage(struct gl_context *ctx, GLuint dims,
> &ctx->Unpack, GL_TRUE);
> }
>
> +static GLboolean
> +nouveau_teximage_alloc(struct gl_context *ctx, struct gl_texture_image *ti)
> +{
> + nouveau_teximage(ctx, 3, ti, 0, 0, 0, NULL,
> + &ctx->DefaultPacking, GL_FALSE);
> + return GL_TRUE;
> +}
> +
> static void
> nouveau_texsubimage(struct gl_context *ctx, GLint dims,
> struct gl_texture_image *ti,
> @@ -634,6 +642,7 @@ nouveau_texture_functions_init(struct dd_function_table *functions)
> functions->DeleteTexture = nouveau_texture_free;
> functions->NewTextureImage = nouveau_teximage_new;
> functions->FreeTextureImageBuffer = nouveau_teximage_free;
> + functions->AllocTextureImageBuffer = nouveau_teximage_alloc;
> functions->ChooseTextureFormat = nouveau_choose_tex_format;
> functions->TexImage = nouveau_teximage_123d;
> functions->TexSubImage = nouveau_texsubimage_123d;
> --
> 1.8.1.5
[-- Attachment #1.2: Type: application/pgp-signature, Size: 229 bytes --]
[-- Attachment #2: Type: text/plain, Size: 181 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-06 20:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-04 8:28 [PATCH] nouveau_vieux: add AllocTextureImageBuffer implementation Ilia Mirkin
[not found] ` <1380875338-25572-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2013-10-06 20:31 ` Francisco Jerez
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.