From ae0ef6f69f351cacdc7eaa9b21097a7c1b414e44 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Wed, 18 Aug 2010 17:28:08 +0200 Subject: gallium: make all checks for PIPE_TEXTURE_2D check for PIPE_TEXTURE_RECT too Searched for them with: git grep -E '[!=]=.*PIPE_TEXTURE_2D|PIPE_TEXTURE_2D.*[!=]=|case.*PIPE_TEXTURE_2D' Behavior hasn't been changed. --- src/gallium/drivers/nv50/nv50_miptree.c | 3 ++- src/gallium/drivers/nv50/nv50_tex.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/nv50') diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c index b7cd92158f..c0f5cc10dd 100644 --- a/src/gallium/drivers/nv50/nv50_miptree.c +++ b/src/gallium/drivers/nv50/nv50_miptree.c @@ -235,7 +235,8 @@ nv50_miptree_from_handle(struct pipe_screen *pscreen, unsigned stride; /* Only supports 2D, non-mipmapped textures for the moment */ - if (template->target != PIPE_TEXTURE_2D || + if ((template->target != PIPE_TEXTURE_2D && + template->target != PIPE_TEXTURE_RECT) || template->last_level != 0 || template->depth0 != 1) return NULL; diff --git a/src/gallium/drivers/nv50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c index 5ea0c1d726..4db53f7ec2 100644 --- a/src/gallium/drivers/nv50/nv50_tex.c +++ b/src/gallium/drivers/nv50/nv50_tex.c @@ -131,6 +131,7 @@ nv50_tex_construct(struct nv50_sampler_view *view) tic[2] |= NV50TIC_0_2_TARGET_1D; break; case PIPE_TEXTURE_2D: + case PIPE_TEXTURE_RECT: tic[2] |= NV50TIC_0_2_TARGET_2D; break; case PIPE_TEXTURE_3D: -- cgit v1.2.3 From 09bf09cf92c3958c3b8268f38387804084ca30e2 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Wed, 18 Aug 2010 17:29:59 +0200 Subject: nv50: use NV50TIC_0_2_TARGET_RECT --- src/gallium/drivers/nv50/nv50_tex.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/nv50') diff --git a/src/gallium/drivers/nv50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c index 4db53f7ec2..d41d9c5102 100644 --- a/src/gallium/drivers/nv50/nv50_tex.c +++ b/src/gallium/drivers/nv50/nv50_tex.c @@ -131,9 +131,11 @@ nv50_tex_construct(struct nv50_sampler_view *view) tic[2] |= NV50TIC_0_2_TARGET_1D; break; case PIPE_TEXTURE_2D: - case PIPE_TEXTURE_RECT: tic[2] |= NV50TIC_0_2_TARGET_2D; break; + case PIPE_TEXTURE_RECT: + tic[2] |= NV50TIC_0_2_TARGET_RECT; + break; case PIPE_TEXTURE_3D: tic[2] |= NV50TIC_0_2_TARGET_3D; break; -- cgit v1.2.3 From 2506b32eecbaacf5609f0c4654a9f90c72ce0c81 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 21 Aug 2010 21:42:17 -0700 Subject: nv50: Disable unused code. Disable release_hw and emit_mov_from_pred functions as they are currently not being used. --- src/gallium/drivers/nv50/nv50_program.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/drivers/nv50') diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index 8cb1639013..cec2290481 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -306,6 +306,7 @@ alloc_temp(struct nv50_pc *pc, struct nv50_reg *dst) return NULL; } +#if 0 /* release the hardware resource held by r */ static void release_hw(struct nv50_pc *pc, struct nv50_reg *r) @@ -321,6 +322,7 @@ release_hw(struct nv50_pc *pc, struct nv50_reg *r) if (r->index == -1) FREE(r); } +#endif static void free_temp(struct nv50_pc *pc, struct nv50_reg *r) @@ -885,6 +887,7 @@ set_half_src(struct nv50_pc *pc, struct nv50_reg *src, int lh, e->inst[pos / 32] |= ((src->hw * 2) + lh) << (pos % 32); } +#if 0 static void emit_mov_from_pred(struct nv50_pc *pc, struct nv50_reg *dst, int pred) { @@ -897,6 +900,7 @@ emit_mov_from_pred(struct nv50_pc *pc, struct nv50_reg *dst, int pred) emit(pc, e); } +#endif static void emit_mov_to_pred(struct nv50_pc *pc, int pred, struct nv50_reg *src) -- cgit v1.2.3 From 4a06525737c17126243a48741c87298ad1ffd076 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 21 Aug 2010 22:01:04 -0700 Subject: nv50: Silence incompatible pointer type initialization warning. Silence the following GCC warning. warning: initialization from incompatible pointer type --- src/gallium/drivers/nv50/nv50_push.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/nv50') diff --git a/src/gallium/drivers/nv50/nv50_push.c b/src/gallium/drivers/nv50/nv50_push.c index 6a2ffd5a3c..57c0010bf4 100644 --- a/src/gallium/drivers/nv50/nv50_push.c +++ b/src/gallium/drivers/nv50/nv50_push.c @@ -108,8 +108,9 @@ emit_vertex(struct push_context *ctx, unsigned n) int i; if (ctx->edgeflag_attr < 16) { - float *edgeflag = (uint8_t *)ctx->attr[ctx->edgeflag_attr].map + - ctx->attr[ctx->edgeflag_attr].stride * n; + float *edgeflag = (float *) + ((uint8_t *)ctx->attr[ctx->edgeflag_attr].map + + ctx->attr[ctx->edgeflag_attr].stride * n); if (*edgeflag != ctx->edgeflag) { BEGIN_RING(chan, tesla, NV50TCL_EDGEFLAG_ENABLE, 1); -- cgit v1.2.3