projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gallium: fix up drivers for edgeflag changes
[mesa.git]
/
src
/
gallium
/
drivers
/
nv30
/
nv30_vbo.c
diff --git
a/src/gallium/drivers/nv30/nv30_vbo.c
b/src/gallium/drivers/nv30/nv30_vbo.c
index ff2bf6e71b55fff25593dd0c0ae2db1afec8f837..e32b8141af85022abd998a1f89dbb580203684c9 100644
(file)
--- a/
src/gallium/drivers/nv30/nv30_vbo.c
+++ b/
src/gallium/drivers/nv30/nv30_vbo.c
@@
-1,5
+1,6
@@
#include "pipe/p_context.h"
#include "pipe/p_state.h"
#include "pipe/p_context.h"
#include "pipe/p_state.h"
+#include "pipe/p_inlines.h"
#include "nv30_context.h"
#include "nv30_state.h"
#include "nv30_context.h"
#include "nv30_state.h"
@@
-108,7
+109,7
@@
nv30_vbo_static_attrib(struct nv30_context *nv30, struct nouveau_stateobj *so,
int attrib, struct pipe_vertex_element *ve,
struct pipe_vertex_buffer *vb)
{
int attrib, struct pipe_vertex_element *ve,
struct pipe_vertex_buffer *vb)
{
- struct pipe_
winsys *ws = nv30->pipe.winsys
;
+ struct pipe_
screen *pscreen = nv30->pipe.screen
;
struct nouveau_grobj *rankine = nv30->screen->rankine;
unsigned type, ncomp;
void *map;
struct nouveau_grobj *rankine = nv30->screen->rankine;
unsigned type, ncomp;
void *map;
@@
-116,7
+117,7
@@
nv30_vbo_static_attrib(struct nv30_context *nv30, struct nouveau_stateobj *so,
if (nv30_vbo_format_to_hw(ve->src_format, &type, &ncomp))
return FALSE;
if (nv30_vbo_format_to_hw(ve->src_format, &type, &ncomp))
return FALSE;
- map =
ws->buffer_map(ws
, vb->buffer, PIPE_BUFFER_USAGE_CPU_READ);
+ map =
pipe_buffer_map(pscreen
, vb->buffer, PIPE_BUFFER_USAGE_CPU_READ);
map += vb->buffer_offset + ve->src_offset;
switch (type) {
map += vb->buffer_offset + ve->src_offset;
switch (type) {
@@
-148,18
+149,17
@@
nv30_vbo_static_attrib(struct nv30_context *nv30, struct nouveau_stateobj *so,
so_data (so, fui(v[0]));
break;
default:
so_data (so, fui(v[0]));
break;
default:
-
ws->buffer_unmap(ws
, vb->buffer);
+
pipe_buffer_unmap(pscreen
, vb->buffer);
return FALSE;
}
}
break;
default:
return FALSE;
}
}
break;
default:
-
ws->buffer_unmap(ws
, vb->buffer);
+
pipe_buffer_unmap(pscreen
, vb->buffer);
return FALSE;
}
return FALSE;
}
- ws->buffer_unmap(ws, vb->buffer);
-
+ pipe_buffer_unmap(pscreen, vb->buffer);
return TRUE;
}
return TRUE;
}
@@
-168,7
+168,7
@@
nv30_draw_arrays(struct pipe_context *pipe,
unsigned mode, unsigned start, unsigned count)
{
struct nv30_context *nv30 = nv30_context(pipe);
unsigned mode, unsigned start, unsigned count)
{
struct nv30_context *nv30 = nv30_context(pipe);
- struct nouveau_channel *chan = nv30->
nvws->
channel;
+ struct nouveau_channel *chan = nv30->
screen->base.
channel;
unsigned restart = 0;
nv30_vbo_set_idxbuf(nv30, NULL, 0);
unsigned restart = 0;
nv30_vbo_set_idxbuf(nv30, NULL, 0);
@@
-228,7
+228,7
@@
static INLINE void
nv30_draw_elements_u08(struct nv30_context *nv30, void *ib,
unsigned mode, unsigned start, unsigned count)
{
nv30_draw_elements_u08(struct nv30_context *nv30, void *ib,
unsigned mode, unsigned start, unsigned count)
{
- struct nouveau_channel *chan = nv30->
nvws->
channel;
+ struct nouveau_channel *chan = nv30->
screen->base.
channel;
while (count) {
uint8_t *elts = (uint8_t *)ib + start;
while (count) {
uint8_t *elts = (uint8_t *)ib + start;
@@
-277,7
+277,7
@@
static INLINE void
nv30_draw_elements_u16(struct nv30_context *nv30, void *ib,
unsigned mode, unsigned start, unsigned count)
{
nv30_draw_elements_u16(struct nv30_context *nv30, void *ib,
unsigned mode, unsigned start, unsigned count)
{
- struct nouveau_channel *chan = nv30->
nvws->
channel;
+ struct nouveau_channel *chan = nv30->
screen->base.
channel;
while (count) {
uint16_t *elts = (uint16_t *)ib + start;
while (count) {
uint16_t *elts = (uint16_t *)ib + start;
@@
-326,7
+326,7
@@
static INLINE void
nv30_draw_elements_u32(struct nv30_context *nv30, void *ib,
unsigned mode, unsigned start, unsigned count)
{
nv30_draw_elements_u32(struct nv30_context *nv30, void *ib,
unsigned mode, unsigned start, unsigned count)
{
- struct nouveau_channel *chan = nv30->
nvws->
channel;
+ struct nouveau_channel *chan = nv30->
screen->base.
channel;
while (count) {
uint32_t *elts = (uint32_t *)ib + start;
while (count) {
uint32_t *elts = (uint32_t *)ib + start;
@@
-368,10
+368,10
@@
nv30_draw_elements_inline(struct pipe_context *pipe,
unsigned mode, unsigned start, unsigned count)
{
struct nv30_context *nv30 = nv30_context(pipe);
unsigned mode, unsigned start, unsigned count)
{
struct nv30_context *nv30 = nv30_context(pipe);
- struct pipe_
winsys *ws = pipe->winsys
;
+ struct pipe_
screen *pscreen = pipe->screen
;
void *map;
void *map;
- map =
ws->buffer_map(ws
, ib, PIPE_BUFFER_USAGE_CPU_READ);
+ map =
pipe_buffer_map(pscreen
, ib, PIPE_BUFFER_USAGE_CPU_READ);
if (!ib) {
NOUVEAU_ERR("failed mapping ib\n");
return FALSE;
if (!ib) {
NOUVEAU_ERR("failed mapping ib\n");
return FALSE;
@@
-392,7
+392,7
@@
nv30_draw_elements_inline(struct pipe_context *pipe,
break;
}
break;
}
-
ws->buffer_unmap(ws
, ib);
+
pipe_buffer_unmap(pscreen
, ib);
return TRUE;
}
return TRUE;
}
@@
-401,7
+401,7
@@
nv30_draw_elements_vbo(struct pipe_context *pipe,
unsigned mode, unsigned start, unsigned count)
{
struct nv30_context *nv30 = nv30_context(pipe);
unsigned mode, unsigned start, unsigned count)
{
struct nv30_context *nv30 = nv30_context(pipe);
- struct nouveau_channel *chan = nv30->
nvws->
channel;
+ struct nouveau_channel *chan = nv30->
screen->base.
channel;
unsigned restart = 0;
while (count) {
unsigned restart = 0;
while (count) {
@@
-485,11
+485,6
@@
nv30_vbo_validate(struct nv30_context *nv30)
unsigned vb_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD;
int hw;
unsigned vb_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD;
int hw;
- if (nv30->edgeflags) {
- /*nv30->fallback_swtnl |= NV30_NEW_ARRAYS;*/
- return FALSE;
- }
-
vtxbuf = so_new(20, 18);
so_method(vtxbuf, rankine, NV34TCL_VTXBUF_ADDRESS(0), nv30->vtxelt_nr);
vtxfmt = so_new(17, 0);
vtxbuf = so_new(20, 18);
so_method(vtxbuf, rankine, NV34TCL_VTXBUF_ADDRESS(0), nv30->vtxelt_nr);
vtxfmt = so_new(17, 0);