summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nv30_fragprog.c
diff options
context:
space:
mode:
authorBen Skeggs <darktama@iinet.net.au>2007-02-06 00:39:50 +1100
committerBen Skeggs <darktama@iinet.net.au>2007-02-06 00:39:50 +1100
commite7654b22aa02636d17a88a9a5ee1eeb213d81f30 (patch)
tree0ebd4a6c52f234f4b2eb17996882b99d2bc3c944 /src/mesa/drivers/dri/nouveau/nv30_fragprog.c
parent3805ccf02015e8127748e6f53ae9d7419ae3f633 (diff)
nouveau: new bufferobj code.
The old code suffered from a number of issues, the most severe being that with the Mesa VBO merge even swtcl used the driver's bufferobj interface. On most VBO types (or non-AGP cards) the buffer ended up in vram, and killed swtcl performance greatly. All bufferobj's start in system memory now, until they get referenced as a "real" VBO. The other big change is that only potentially "damaged" areas are uploaded/downloaded to/from the hardware.
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nv30_fragprog.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv30_fragprog.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c
index 02bd8014cc..f868ec9293 100644
--- a/src/mesa/drivers/dri/nouveau/nv30_fragprog.c
+++ b/src/mesa/drivers/dri/nouveau/nv30_fragprog.c
@@ -32,14 +32,13 @@ NV30FPUploadToHW(GLcontext *ctx, nouveauShader *nvs)
GL_ARRAY_BUFFER_ARB);
/* Should use STATIC_DRAW_ARB if shader doesn't use changable params */
- ctx->Driver.BufferData(ctx, GL_ARRAY_BUFFER_ARB,
+ nouveau_bo_init_storage(ctx, NOUVEAU_BO_VRAM_OK,
nvs->program_size * sizeof(uint32_t),
(const GLvoid *)nvs->program,
GL_DYNAMIC_DRAW_ARB,
nvs->program_buffer);
- offset = nouveau_bufferobj_gpu_ref(ctx, GL_READ_ONLY_ARB,
- nvs->program_buffer);
+ offset = nouveau_bo_gpu_ref(ctx, nvs->program_buffer);
/* Not using state cache here, updated programs at the same address don't
* seem to take effect unless the ACTIVE_PROGRAM method is called again.