summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv30/nv30_query.c
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-02-20 18:37:43 +0100
committerYounes Manton <[email protected]>2010-03-15 00:03:01 -0400
commitb8e56d4cddbd9c491b940e3ce5974c526802c752 (patch)
tree6ae0a1030c6a43c6596393b787cea3d7b7e23352 /src/gallium/drivers/nv30/nv30_query.c
parentd673c92810636dcc6de33d3618d494ce9f5717c1 (diff)
nv30, nv40: unify all structures and headers, except shaders
This patch unifies nv[34]0_screen.h, nv[34]0_context.h and nv[34]0_state.h The unified files are put in a new "nvfx" directory. nv30_context.h and nv40_context.h still exist to hold the function prototypes and include nvfx_context.h nv[34]0_screen.h and nv[34]0_state.h are deleted, replaced by the unified versions. nv40 includes some extra fields for swtnl and user clip planes support. These fields will be unused on nv30 until that functionality gets added to it too (by unification with nv40).
Diffstat (limited to 'src/gallium/drivers/nv30/nv30_query.c')
-rw-r--r--src/gallium/drivers/nv30/nv30_query.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/gallium/drivers/nv30/nv30_query.c b/src/gallium/drivers/nv30/nv30_query.c
index 21a5e8ad7c9..53b11a89430 100644
--- a/src/gallium/drivers/nv30/nv30_query.c
+++ b/src/gallium/drivers/nv30/nv30_query.c
@@ -39,9 +39,9 @@ nv30_query_destroy(struct pipe_context *pipe, struct pipe_query *pq)
static void
nv30_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
{
- struct nv30_context *nv30 = nv30_context(pipe);
+ struct nvfx_context *nvfx = nvfx_context(pipe);
struct nv30_query *q = nv30_query(pq);
- struct nv30_screen *screen = nv30->screen;
+ struct nvfx_screen *screen = nvfx->screen;
struct nouveau_channel *chan = screen->base.channel;
struct nouveau_grobj *eng3d = screen->eng3d;
@@ -56,9 +56,9 @@ nv30_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
pipe->get_query_result(pipe, pq, 1, &tmp);
}
- if (nouveau_resource_alloc(nv30->screen->query_heap, 1, NULL, &q->object))
+ if (nouveau_resource_alloc(nvfx->screen->query_heap, 1, NULL, &q->object))
assert(0);
- nouveau_notifier_reset(nv30->screen->query, q->object->start);
+ nouveau_notifier_reset(nvfx->screen->query, q->object->start);
BEGIN_RING(chan, eng3d, NV34TCL_QUERY_RESET, 1);
OUT_RING (chan, 1);
@@ -71,8 +71,8 @@ nv30_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
static void
nv30_query_end(struct pipe_context *pipe, struct pipe_query *pq)
{
- struct nv30_context *nv30 = nv30_context(pipe);
- struct nv30_screen *screen = nv30->screen;
+ struct nvfx_context *nvfx = nvfx_context(pipe);
+ struct nvfx_screen *screen = nvfx->screen;
struct nouveau_channel *chan = screen->base.channel;
struct nouveau_grobj *eng3d = screen->eng3d;
struct nv30_query *q = nv30_query(pq);
@@ -87,7 +87,7 @@ static boolean
nv30_query_result(struct pipe_context *pipe, struct pipe_query *pq,
boolean wait, uint64_t *result)
{
- struct nv30_context *nv30 = nv30_context(pipe);
+ struct nvfx_context *nvfx = nvfx_context(pipe);
struct nv30_query *q = nv30_query(pq);
assert(q->object && q->type == PIPE_QUERY_OCCLUSION_COUNTER);
@@ -95,18 +95,18 @@ nv30_query_result(struct pipe_context *pipe, struct pipe_query *pq,
if (!q->ready) {
unsigned status;
- status = nouveau_notifier_status(nv30->screen->query,
+ status = nouveau_notifier_status(nvfx->screen->query,
q->object->start);
if (status != NV_NOTIFY_STATE_STATUS_COMPLETED) {
if (wait == FALSE)
return FALSE;
- nouveau_notifier_wait_status(nv30->screen->query,
+ nouveau_notifier_wait_status(nvfx->screen->query,
q->object->start,
NV_NOTIFY_STATE_STATUS_COMPLETED, 0);
}
- q->result = nouveau_notifier_return_val(nv30->screen->query,
+ q->result = nouveau_notifier_return_val(nvfx->screen->query,
q->object->start);
q->ready = TRUE;
nouveau_resource_free(&q->object);
@@ -117,11 +117,11 @@ nv30_query_result(struct pipe_context *pipe, struct pipe_query *pq,
}
void
-nv30_init_query_functions(struct nv30_context *nv30)
+nv30_init_query_functions(struct nvfx_context *nvfx)
{
- nv30->pipe.create_query = nv30_query_create;
- nv30->pipe.destroy_query = nv30_query_destroy;
- nv30->pipe.begin_query = nv30_query_begin;
- nv30->pipe.end_query = nv30_query_end;
- nv30->pipe.get_query_result = nv30_query_result;
+ nvfx->pipe.create_query = nv30_query_create;
+ nvfx->pipe.destroy_query = nv30_query_destroy;
+ nvfx->pipe.begin_query = nv30_query_begin;
+ nvfx->pipe.end_query = nv30_query_end;
+ nvfx->pipe.get_query_result = nv30_query_result;
}