summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2009-02-06 14:06:39 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2009-02-06 14:06:39 -0800
commit2d6355495ce6f8668df3d9eb8825815bfead5401 (patch)
tree99482125bc874a4d6bd344e83950c0bb50dd6859 /src/gallium
parent5538323005a20d6911c7e51cb5f26b242c04a57c (diff)
parent776d86606cd8b250802730410d5e55a41944cf0a (diff)
Merge branch 'gallium-0.2' of git://anongit.freedesktop.org/mesa/mesa into gallium-0.2
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nv04/nv04_miptree.c1
-rw-r--r--src/gallium/drivers/nv04/nv04_surface_2d.c2
-rw-r--r--src/gallium/drivers/nv10/nv10_miptree.c1
-rw-r--r--src/gallium/drivers/nv20/nv20_miptree.c1
-rw-r--r--src/gallium/drivers/nv30/nv30_miptree.c1
-rw-r--r--src/gallium/drivers/nv40/nv40_miptree.c1
-rw-r--r--src/gallium/state_trackers/g3dvl/vl_basic_csc.c10
-rw-r--r--src/gallium/state_trackers/g3dvl/vl_context.c2
-rw-r--r--src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c10
-rw-r--r--src/gallium/state_trackers/g3dvl/vl_surface.c10
-rw-r--r--src/gallium/winsys/g3dvl/nouveau/Makefile4
-rw-r--r--src/gallium/winsys/g3dvl/nouveau/nouveau_screen_vl.c2
-rw-r--r--src/gallium/winsys/g3dvl/nouveau/nouveau_swapbuffers.c5
13 files changed, 27 insertions, 23 deletions
diff --git a/src/gallium/drivers/nv04/nv04_miptree.c b/src/gallium/drivers/nv04/nv04_miptree.c
index fd908491e9..993c5ef5dd 100644
--- a/src/gallium/drivers/nv04/nv04_miptree.c
+++ b/src/gallium/drivers/nv04/nv04_miptree.c
@@ -87,6 +87,7 @@ nv04_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
mt->base = *pt;
mt->base.refcount = 1;
mt->base.screen = pscreen;
+ mt->level[0].pitch = stride[0];
mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
pipe_buffer_reference(pscreen, &mt->buffer, pb);
diff --git a/src/gallium/drivers/nv04/nv04_surface_2d.c b/src/gallium/drivers/nv04/nv04_surface_2d.c
index 2b84e6c529..b507e993f1 100644
--- a/src/gallium/drivers/nv04/nv04_surface_2d.c
+++ b/src/gallium/drivers/nv04/nv04_surface_2d.c
@@ -277,7 +277,7 @@ nv04_surface_fill(struct nv04_surface_2d *ctx, struct pipe_surface *dst,
cs2d_format = nv04_surface_format(dst->format);
assert(cs2d_format >= 0);
- gdirect_format = nv04_surface_format(dst->format);
+ gdirect_format = nv04_rect_format(dst->format);
assert(gdirect_format >= 0);
WAIT_RING (chan, 16);
diff --git a/src/gallium/drivers/nv10/nv10_miptree.c b/src/gallium/drivers/nv10/nv10_miptree.c
index bbd4b1e15c..9616135461 100644
--- a/src/gallium/drivers/nv10/nv10_miptree.c
+++ b/src/gallium/drivers/nv10/nv10_miptree.c
@@ -68,6 +68,7 @@ nv10_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
mt->base = *pt;
mt->base.refcount = 1;
mt->base.screen = pscreen;
+ mt->level[0].pitch = stride[0];
mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
pipe_buffer_reference(pscreen, &mt->buffer, pb);
diff --git a/src/gallium/drivers/nv20/nv20_miptree.c b/src/gallium/drivers/nv20/nv20_miptree.c
index c1155682dc..ef7e9c5428 100644
--- a/src/gallium/drivers/nv20/nv20_miptree.c
+++ b/src/gallium/drivers/nv20/nv20_miptree.c
@@ -68,6 +68,7 @@ nv20_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
mt->base = *pt;
mt->base.refcount = 1;
mt->base.screen = pscreen;
+ mt->level[0].pitch = stride[0];
mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
pipe_buffer_reference(pscreen, &mt->buffer, pb);
diff --git a/src/gallium/drivers/nv30/nv30_miptree.c b/src/gallium/drivers/nv30/nv30_miptree.c
index 5458f834aa..23f8829321 100644
--- a/src/gallium/drivers/nv30/nv30_miptree.c
+++ b/src/gallium/drivers/nv30/nv30_miptree.c
@@ -123,6 +123,7 @@ nv30_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
mt->base = *pt;
mt->base.refcount = 1;
mt->base.screen = pscreen;
+ mt->level[0].pitch = stride[0];
mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
pipe_buffer_reference(pscreen, &mt->buffer, pb);
diff --git a/src/gallium/drivers/nv40/nv40_miptree.c b/src/gallium/drivers/nv40/nv40_miptree.c
index e8cd104ea4..9bef23ad1f 100644
--- a/src/gallium/drivers/nv40/nv40_miptree.c
+++ b/src/gallium/drivers/nv40/nv40_miptree.c
@@ -124,6 +124,7 @@ nv40_miptree_blanket(struct pipe_screen *pscreen, const struct pipe_texture *pt,
mt->base = *pt;
mt->base.refcount = 1;
mt->base.screen = pscreen;
+ mt->level[0].pitch = stride[0];
mt->level[0].image_offset = CALLOC(1, sizeof(unsigned));
pipe_buffer_reference(pscreen, &mt->buffer, pb);
diff --git a/src/gallium/state_trackers/g3dvl/vl_basic_csc.c b/src/gallium/state_trackers/g3dvl/vl_basic_csc.c
index 122c42ed0e..187a13a560 100644
--- a/src/gallium/state_trackers/g3dvl/vl_basic_csc.c
+++ b/src/gallium/state_trackers/g3dvl/vl_basic_csc.c
@@ -544,7 +544,7 @@ static int vlCreateDataBufs
* to display a rendered surface
* Quad is rendered as a tri strip
*/
- csc->vertex_bufs[0].pitch = sizeof(struct vlVertex2f);
+ csc->vertex_bufs[0].stride = sizeof(struct vlVertex2f);
csc->vertex_bufs[0].max_index = 3;
csc->vertex_bufs[0].buffer_offset = 0;
csc->vertex_bufs[0].buffer = pipe_buffer_create
@@ -573,7 +573,7 @@ static int vlCreateDataBufs
* Create our texcoord buffer and texcoord buffer element
* Texcoord buffer contains the TCs for mapping the rendered surface to the 4 vertices
*/
- csc->vertex_bufs[1].pitch = sizeof(struct vlVertex2f);
+ csc->vertex_bufs[1].stride = sizeof(struct vlVertex2f);
csc->vertex_bufs[1].max_index = 3;
csc->vertex_bufs[1].buffer_offset = 0;
csc->vertex_bufs[1].buffer = pipe_buffer_create
@@ -602,26 +602,24 @@ static int vlCreateDataBufs
* Create our vertex shader's constant buffer
* Const buffer contains scaling and translation vectors
*/
- csc->vs_const_buf.size = sizeof(struct vlVertexShaderConsts);
csc->vs_const_buf.buffer = pipe_buffer_create
(
pipe->screen,
1,
PIPE_BUFFER_USAGE_CONSTANT | PIPE_BUFFER_USAGE_DISCARD,
- csc->vs_const_buf.size
+ sizeof(struct vlVertexShaderConsts)
);
/*
* Create our fragment shader's constant buffer
* Const buffer contains the color conversion matrix and bias vectors
*/
- csc->fs_const_buf.size = sizeof(struct vlFragmentShaderConsts);
csc->fs_const_buf.buffer = pipe_buffer_create
(
pipe->screen,
1,
PIPE_BUFFER_USAGE_CONSTANT,
- csc->fs_const_buf.size
+ sizeof(struct vlFragmentShaderConsts)
);
/*
diff --git a/src/gallium/state_trackers/g3dvl/vl_context.c b/src/gallium/state_trackers/g3dvl/vl_context.c
index c4c4e23c15..65ddb9f01e 100644
--- a/src/gallium/state_trackers/g3dvl/vl_context.c
+++ b/src/gallium/state_trackers/g3dvl/vl_context.c
@@ -86,7 +86,7 @@ static int vlInitCommon(struct vlContext *context)
}
dsa.alpha.enabled = 0;
dsa.alpha.func = PIPE_FUNC_ALWAYS;
- dsa.alpha.ref = 0;
+ dsa.alpha.ref_value = 0;
context->dsa = pipe->create_depth_stencil_alpha_state(pipe, &dsa);
pipe->bind_depth_stencil_alpha_state(pipe, context->dsa);
diff --git a/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c b/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c
index d53482f579..2176bb86d8 100644
--- a/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c
+++ b/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c
@@ -911,7 +911,7 @@ static int vlCreateDataBufs
mc->macroblocks_per_picture = mbw * mbh;
/* Create our vertex buffers */
- mc->vertex_bufs.ycbcr.pitch = sizeof(struct vlVertex2f) * 4;
+ mc->vertex_bufs.ycbcr.stride = sizeof(struct vlVertex2f) * 4;
mc->vertex_bufs.ycbcr.max_index = 24 * mc->macroblocks_per_picture - 1;
mc->vertex_bufs.ycbcr.buffer_offset = 0;
mc->vertex_bufs.ycbcr.buffer = pipe_buffer_create
@@ -924,7 +924,7 @@ static int vlCreateDataBufs
for (i = 1; i < 3; ++i)
{
- mc->vertex_bufs.all[i].pitch = sizeof(struct vlVertex2f) * 2;
+ mc->vertex_bufs.all[i].stride = sizeof(struct vlVertex2f) * 2;
mc->vertex_bufs.all[i].max_index = 24 * mc->macroblocks_per_picture - 1;
mc->vertex_bufs.all[i].buffer_offset = 0;
mc->vertex_bufs.all[i].buffer = pipe_buffer_create
@@ -985,22 +985,20 @@ static int vlCreateDataBufs
mc->vertex_elems[7].src_format = PIPE_FORMAT_R32G32_FLOAT;
/* Create our constant buffer */
- mc->vs_const_buf.size = sizeof(struct vlVertexShaderConsts);
mc->vs_const_buf.buffer = pipe_buffer_create
(
pipe->screen,
DEFAULT_BUF_ALIGNMENT,
PIPE_BUFFER_USAGE_CONSTANT | PIPE_BUFFER_USAGE_DISCARD,
- mc->vs_const_buf.size
+ sizeof(struct vlVertexShaderConsts)
);
- mc->fs_const_buf.size = sizeof(struct vlFragmentShaderConsts);
mc->fs_const_buf.buffer = pipe_buffer_create
(
pipe->screen,
DEFAULT_BUF_ALIGNMENT,
PIPE_BUFFER_USAGE_CONSTANT,
- mc->fs_const_buf.size
+ sizeof(struct vlFragmentShaderConsts)
);
memcpy
diff --git a/src/gallium/state_trackers/g3dvl/vl_surface.c b/src/gallium/state_trackers/g3dvl/vl_surface.c
index 0fa7b25b92..92388f7978 100644
--- a/src/gallium/state_trackers/g3dvl/vl_surface.c
+++ b/src/gallium/state_trackers/g3dvl/vl_surface.c
@@ -152,9 +152,9 @@ int vlPutPicture
bind_pipe_drawable(pipe, drawable);
- pipe->winsys->flush_frontbuffer
+ pipe->screen->flush_frontbuffer
(
- pipe->winsys,
+ pipe->screen,
csc->vlGetFrameBuffer(csc),
pipe->priv
);
@@ -172,13 +172,13 @@ int vlSurfaceGetStatus
assert(surface->context);
assert(status);
- if (surface->render_fence && !surface->context->pipe->winsys->fence_signalled(surface->context->pipe->winsys, surface->render_fence, 0))
+ if (surface->render_fence && !surface->context->pipe->screen->fence_signalled(surface->context->pipe->screen, surface->render_fence, 0))
{
*status = vlResourceStatusRendering;
return 0;
}
- if (surface->disp_fence && !surface->context->pipe->winsys->fence_signalled(surface->context->pipe->winsys, surface->disp_fence, 0))
+ if (surface->disp_fence && !surface->context->pipe->screen->fence_signalled(surface->context->pipe->screen, surface->disp_fence, 0))
{
*status = vlResourceStatusDisplaying;
return 0;
@@ -211,7 +211,7 @@ int vlSurfaceSync
assert(surface->context);
assert(surface->render_fence);
- surface->context->pipe->winsys->fence_finish(surface->context->pipe->winsys, surface->render_fence, 0);
+ surface->context->pipe->screen->fence_finish(surface->context->pipe->screen, surface->render_fence, 0);
return 0;
}
diff --git a/src/gallium/winsys/g3dvl/nouveau/Makefile b/src/gallium/winsys/g3dvl/nouveau/Makefile
index 22d925b643..2997f6b79c 100644
--- a/src/gallium/winsys/g3dvl/nouveau/Makefile
+++ b/src/gallium/winsys/g3dvl/nouveau/Makefile
@@ -11,6 +11,7 @@ CFLAGS += -g -Wall -Werror=implicit-function-declaration -fPIC \
-I${GALLIUMDIR}/winsys/drm/nouveau \
-I${DRMDIR}/include \
-I${DRMDIR}/include/drm \
+ -I${DRMDIR}/include/nouveau \
-I${GALLIUMDIR}/drivers \
-I${GALLIUMDIR}/auxiliary \
-I${DRIDIR}/include
@@ -23,13 +24,14 @@ LDFLAGS += -L${DRMDIR}/lib \
-L${GALLIUMDIR}/auxiliary/translate \
-L${GALLIUMDIR}/auxiliary/rtasm \
-L${GALLIUMDIR}/auxiliary/cso_cache \
+ -L${GALLIUMDIR}/drivers/nv04 \
-L${GALLIUMDIR}/drivers/nv10 \
-L${GALLIUMDIR}/drivers/nv20 \
-L${GALLIUMDIR}/drivers/nv30 \
-L${GALLIUMDIR}/drivers/nv40 \
-L${GALLIUMDIR}/drivers/nv50
-LIBS += -lnouveaudrm -ldriclient -ldrm -lnv10 -lnv20 -lnv30 -lnv40 -lnv50 -ldraw -ltgsi -ltranslate -lrtasm -lcso_cache -lm
+LIBS += -lnouveaudrm -ldriclient -ldrm_nouveau -ldrm -lnv04 -lnv10 -lnv20 -lnv30 -lnv40 -lnv50 -ldraw -ltgsi -ltranslate -lrtasm -lcso_cache -lm
#############################################
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_screen_vl.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_screen_vl.c
index 658dafd910..b7c74f8299 100644
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_screen_vl.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_screen_vl.c
@@ -4,7 +4,7 @@
#include <common/nouveau_dri.h>
#include <common/nouveau_local.h>
-#if NOUVEAU_DRM_HEADER_PATCHLEVEL != 11
+#if NOUVEAU_DRM_HEADER_PATCHLEVEL != 12
#error nouveau_drm.h version does not match expected version
#endif
diff --git a/src/gallium/winsys/g3dvl/nouveau/nouveau_swapbuffers.c b/src/gallium/winsys/g3dvl/nouveau/nouveau_swapbuffers.c
index 16e6d5543c..864be37871 100644
--- a/src/gallium/winsys/g3dvl/nouveau/nouveau_swapbuffers.c
+++ b/src/gallium/winsys/g3dvl/nouveau/nouveau_swapbuffers.c
@@ -9,6 +9,7 @@ nouveau_copy_buffer(dri_drawable_t *dri_drawable, struct pipe_surface *surf,
const drm_clip_rect_t *rect)
{
struct nouveau_context_vl *nv = dri_drawable->private;
+ struct pipe_context *pipe = nv->base.nvc->pctx[nv->base.pctx_id];
drm_clip_rect_t *pbox;
int nbox, i;
@@ -20,7 +21,6 @@ nouveau_copy_buffer(dri_drawable_t *dri_drawable, struct pipe_surface *surf,
pbox = dri_drawable->cliprects;
nbox = dri_drawable->num_cliprects;
- nv->base.surface_copy_prep(&nv->base, nv->base.frontbuffer, surf);
for (i = 0; i < nbox; i++, pbox++) {
int sx, sy, dx, dy, w, h;
@@ -31,7 +31,8 @@ nouveau_copy_buffer(dri_drawable_t *dri_drawable, struct pipe_surface *surf,
w = pbox->x2 - pbox->x1;
h = pbox->y2 - pbox->y1;
- nv->base.surface_copy(&nv->base, dx, dy, sx, sy, w, h);
+ pipe->surface_copy(pipe, FALSE, nv->base.frontbuffer,
+ dx, dy, surf, sx, sy, w, h);
}
FIRE_RING(nv->base.nvc->channel);