All of lore.kernel.org
 help / color / mirror / Atom feed
From: Victor Stinner <victor.stinner-XgyrR7WU8tJ8UrSeD/g0lQ@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH] Fix nv50_screen_create()
Date: Fri, 06 Mar 2009 14:05:59 +0100	[thread overview]
Message-ID: <49B11FB7.5020902@haypocalc.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 117 bytes --]

Setup screen->pipe before using it (screen->constbuf =
screen->pipe.buffer_create(...)): just move the code.

Victor

[-- Attachment #2: 0002-Fix-nv50_screen_create.patch --]
[-- Type: text/x-patch, Size: 2469 bytes --]

From c1a140dd7eab917a913bc46ff450f9fa6553366c Mon Sep 17 00:00:00 2001
From: Victor Stinner <victor.stinner-XgyrR7WU8tJ8UrSeD/g0lQ@public.gmane.org>
Date: Fri, 6 Mar 2009 14:03:15 +0100
Subject: [PATCH] Fix nv50_screen_create()

Setup screen->pipe before using it (screen->constbuf =
screen->pipe.buffer_create(...))
---
 src/gallium/drivers/nv50/nv50_screen.c |   35 ++++++++++++++++---------------
 1 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index bbfe42e..9bf5e8c 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -124,9 +124,9 @@ nv50_screen_get_param(struct pipe_screen *pscreen, int param)
 		return 1;
 	case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS:
 		return 0;
-	case NOUVEAU_CAP_HW_VTXBUF:	
+	case NOUVEAU_CAP_HW_VTXBUF:
 		return 1;
-	case NOUVEAU_CAP_HW_IDXBUF:	
+	case NOUVEAU_CAP_HW_IDXBUF:
 		return 0;
 	default:
 		NOUVEAU_ERR("Unknown PIPE_CAP %d\n", param);
@@ -234,6 +234,22 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
 		return NULL;
 	}
 
+        /* Setup the pipe */
+	screen->pipe.winsys = ws;
+
+	screen->pipe.destroy = nv50_screen_destroy;
+
+	screen->pipe.get_name = nv50_screen_get_name;
+	screen->pipe.get_vendor = nv50_screen_get_vendor;
+	screen->pipe.get_param = nv50_screen_get_param;
+	screen->pipe.get_paramf = nv50_screen_get_paramf;
+
+	screen->pipe.is_format_supported = nv50_screen_is_format_supported;
+
+	nv50_screen_init_miptree_functions(&screen->pipe);
+	nv50_transfer_init_screen_functions(&screen->pipe);
+	u_simple_screen_init(&screen->pipe);
+
 	/* Static M2MF init */
 	so = so_new(32, 0);
 	so_method(so, screen->m2mf, 0x0180, 3);
@@ -353,21 +369,6 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
 	so_ref(so, &screen->static_init);
 	nvws->push_flush(nvws, 0, NULL);
 
-	screen->pipe.winsys = ws;
-
-	screen->pipe.destroy = nv50_screen_destroy;
-
-	screen->pipe.get_name = nv50_screen_get_name;
-	screen->pipe.get_vendor = nv50_screen_get_vendor;
-	screen->pipe.get_param = nv50_screen_get_param;
-	screen->pipe.get_paramf = nv50_screen_get_paramf;
-
-	screen->pipe.is_format_supported = nv50_screen_is_format_supported;
-
-	nv50_screen_init_miptree_functions(&screen->pipe);
-	nv50_transfer_init_screen_functions(&screen->pipe);
-	u_simple_screen_init(&screen->pipe);
-
 	return &screen->pipe;
 }
 
-- 
1.5.6.3


[-- Attachment #3: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

             reply	other threads:[~2009-03-06 13:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-06 13:05 Victor Stinner [this message]
     [not found] ` <49B11FB7.5020902-XgyrR7WU8tJ8UrSeD/g0lQ@public.gmane.org>
2009-03-07  7:51   ` [PATCH] Fix nv50_screen_create() Ben Skeggs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49B11FB7.5020902@haypocalc.com \
    --to=victor.stinner-xgyrr7wu8tj8ursed/g0lq@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.