All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nouveau/vieux: only advertise supported texture formats
@ 2012-04-30 17:16 Lucas Stach
       [not found] ` <1335806214-13903-1-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
  2012-04-30 18:08 ` [Nouveau] " Francisco Jerez
  0 siblings, 2 replies; 7+ messages in thread
From: Lucas Stach @ 2012-04-30 17:16 UTC (permalink / raw)
  To: nouveau; +Cc: mesa-dev

Fixes an assertion seen by users.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Tested-by: JohnDoe_71Rus on irc
---
 src/mesa/drivers/dri/nouveau/nouveau_context.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 4845767..46c0d70 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -117,6 +117,15 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
 	nouveau_span_functions_init(ctx);
 	_mesa_allow_light_in_model(ctx, GL_FALSE);
 
+	/* only advertise supported texture formats */
+	memset(&ctx->TextureFormatSupported, 0,
+	       sizeof(ctx->TextureFormatSupported));
+	ctx->TextureFormatSupported[MESA_FORMAT_XRGB8888] = true;
+	ctx->TextureFormatSupported[MESA_FORMAT_ARGB8888] = true;
+	ctx->TextureFormatSupported[MESA_FORMAT_RGB565] = true;
+	ctx->TextureFormatSupported[MESA_FORMAT_Z16] = true;
+	ctx->TextureFormatSupported[MESA_FORMAT_Z24_S8] = true;
+
 	/* Allocate a hardware channel. */
 	ret = nouveau_object_new(&context_dev(ctx)->object, 0xbeef0000,
 				 NOUVEAU_FIFO_CHANNEL_CLASS,
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-30 19:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-30 17:16 [PATCH] nouveau/vieux: only advertise supported texture formats Lucas Stach
     [not found] ` <1335806214-13903-1-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
2012-04-30 17:54   ` Christoph Bumiller
     [not found]     ` <1335809942.9221.13.camel@tellur>
2012-04-30 18:27       ` Lucas Stach
2012-04-30 18:08 ` [Nouveau] " Francisco Jerez
     [not found]   ` <1335810158.9221.16.camel@tellur>
2012-04-30 18:26     ` Lucas Stach
2012-04-30 19:42     ` Francisco Jerez
     [not found]       ` <87vckhvwee.fsf-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
2012-04-30 19:54         ` Lucas Stach

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.