summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-08-21 22:48:29 +0200
committerLuca Barbieri <luca@luca-barbieri.com>2010-08-21 23:09:43 +0200
commit11d27871a79fb7ffcf0e139a8c04d90991969023 (patch)
tree5c7e882e6fdad8411e7cff2518309d04331f43c2 /src
parent0d96cbe4a5e0a39c17db007f3815868c6a766382 (diff)
nvfx: fix warnings
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_context.h2
-rw-r--r--src/gallium/drivers/nvfx/nvfx_vbo.c1
-rw-r--r--src/gallium/drivers/nvfx/nvfx_vertprog.c4
3 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_context.h b/src/gallium/drivers/nvfx/nvfx_context.h
index 04447da3e18..83c44ef477c 100644
--- a/src/gallium/drivers/nvfx/nvfx_context.h
+++ b/src/gallium/drivers/nvfx/nvfx_context.h
@@ -312,7 +312,7 @@ extern void nvfx_vertprog_destroy(struct nvfx_context *,
extern void nvfx_push_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info);
/* must WAIT_RING(chan, ncomp + 1) or equivalent beforehand! */
-static inline void nvfx_emit_vtx_attr(struct nouveau_channel* chan, unsigned attrib, float* v, unsigned ncomp)
+static inline void nvfx_emit_vtx_attr(struct nouveau_channel* chan, unsigned attrib, const float* v, unsigned ncomp)
{
switch (ncomp) {
case 4:
diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c
index abd77065123..d1e71992875 100644
--- a/src/gallium/drivers/nvfx/nvfx_vbo.c
+++ b/src/gallium/drivers/nvfx/nvfx_vbo.c
@@ -419,7 +419,6 @@ nvfx_vtxelts_state_create(struct pipe_context *pipe,
unsigned num_elements,
const struct pipe_vertex_element *elements)
{
- struct nvfx_context* nvfx = nvfx_context(pipe);
struct nvfx_vtxelt_state *cso = CALLOC_STRUCT(nvfx_vtxelt_state);
struct translate_key transkey;
unsigned per_vertex_size[16];
diff --git a/src/gallium/drivers/nvfx/nvfx_vertprog.c b/src/gallium/drivers/nvfx/nvfx_vertprog.c
index 7cccffe0ffe..b5dde2592e7 100644
--- a/src/gallium/drivers/nvfx/nvfx_vertprog.c
+++ b/src/gallium/drivers/nvfx/nvfx_vertprog.c
@@ -801,7 +801,6 @@ nvfx_vertprog_prepare(struct nvfx_context* nvfx, struct nvfx_vpc *vpc)
int high_temp = -1, high_addr = -1, nr_imm = 0, i;
struct util_semantic_set set;
unsigned char sem_layout[8];
- unsigned sem_layout_size;
unsigned num_outputs;
num_outputs = util_semantic_set_from_program_file(&set, vpc->vp->pipe.tokens, TGSI_FILE_OUTPUT);
@@ -1061,7 +1060,6 @@ out_err:
boolean
nvfx_vertprog_validate(struct nvfx_context *nvfx)
{
- struct pipe_context *pipe = &nvfx->pipe;
struct nvfx_screen *screen = nvfx->screen;
struct nouveau_channel *chan = screen->base.channel;
struct nouveau_grobj *eng3d = screen->eng3d;
@@ -1200,7 +1198,7 @@ nvfx_vertprog_validate(struct nvfx_context *nvfx)
float *map = NULL;
if (constbuf)
- map = nvfx_buffer(constbuf)->data;
+ map = (float*)nvfx_buffer(constbuf)->data;
for (i = 0; i < vp->nr_consts; i++) {
struct nvfx_vertex_program_data *vpd = &vp->consts[i];