diff options
author | Christoph Bumiller <[email protected]> | 2012-09-30 22:59:34 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2012-09-30 23:09:29 +0200 |
commit | 2149ce41ed6b10f7bff65d7b3f23fd03b89753e3 (patch) | |
tree | 91f7eb9c573275abb6ea4354a45f363a5a40066d /src/gallium | |
parent | 36ea744f58e5b436c45ed857bd92bbb472e641d5 (diff) |
nv50,nvc0: fix 3d engine blit for nvc0
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_surface.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_surface.c | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c index e64a2badd77..f315a235aef 100644 --- a/src/gallium/drivers/nv50/nv50_surface.c +++ b/src/gallium/drivers/nv50/nv50_surface.c @@ -483,6 +483,7 @@ nv50_blitter_make_vp(struct nv50_blitter *blit) blit->vp.out[1].hw = 2; blit->vp.out[1].mask = 0x7; blit->vp.out[1].sn = TGSI_SEMANTIC_GENERIC; + blit->vp.out[1].si = 8; blit->vp.vp.attrs[0] = 0x73; blit->vp.vp.psiz = 0x40; blit->vp.vp.edgeflag = 0x40; @@ -524,8 +525,9 @@ nv50_blitter_make_fp(struct pipe_context *pipe, return NULL; out = ureg_DECL_output(ureg, TGSI_SEMANTIC_COLOR, 0); + /* NOTE: use GENERIC[8] so we don't use the TEXCOORD slots on nvc0 */ tc = ureg_DECL_fs_input( - ureg, TGSI_SEMANTIC_GENERIC, 0, TGSI_INTERPOLATE_LINEAR); + ureg, TGSI_SEMANTIC_GENERIC, 8, TGSI_INTERPOLATE_LINEAR); data = ureg_DECL_temporary(ureg); diff --git a/src/gallium/drivers/nvc0/nvc0_surface.c b/src/gallium/drivers/nvc0/nvc0_surface.c index dcf008537ec..4f79020518e 100644 --- a/src/gallium/drivers/nvc0/nvc0_surface.c +++ b/src/gallium/drivers/nvc0/nvc0_surface.c @@ -618,7 +618,7 @@ nvc0_blit_set_src(struct nvc0_blitctx *ctx, (res->target == PIPE_TEXTURE_3D ? res->depth0 : res->array_size) - 1; } - flags = NV50_TEXVIEW_SCALED_COORDS; + flags = res->last_level ? 0 : NV50_TEXVIEW_SCALED_COORDS; if (filter && res->nr_samples == 8) flags |= NV50_TEXVIEW_FILTER_MSAA8; @@ -826,8 +826,8 @@ nvc0_blit_3d(struct nvc0_context *nvc0, const struct pipe_blit_info *info) x0 = (float)info->src.box.x - x_range * (float)info->dst.box.x; y0 = (float)info->src.box.y - y_range * (float)info->dst.box.y; - x1 = info->src.box.x + 16384.0f * x_range; - y1 = info->src.box.y + 16384.0f * y_range; + x1 = x0 + 16384.0f * x_range; + y1 = y0 + 16384.0f * y_range; x0 *= (float)(1 << nv50_miptree(src)->ms_x); x1 *= (float)(1 << nv50_miptree(src)->ms_x); @@ -851,6 +851,9 @@ nvc0_blit_3d(struct nvc0_context *nvc0, const struct pipe_blit_info *info) z += 0.5f * dz; IMMED_NVC0(push, NVC0_3D(VIEWPORT_TRANSFORM_EN), 0); + BEGIN_NVC0(push, NVC0_3D(VIEWPORT_HORIZ(0)), 2); + PUSH_DATA (push, nvc0->framebuffer.width << 16); + PUSH_DATA (push, nvc0->framebuffer.height << 16); /* Draw a large triangle in screen coordinates covering the whole * render target, with scissors defining the destination region. |