diff options
author | Brian Paul <[email protected]> | 2010-04-19 17:05:05 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-04-19 17:07:25 -0600 |
commit | f4071e55dba8c0f45f3a7f59135b34e5b81fdab8 (patch) | |
tree | 09145390a1500ea50a33ed8e7a1bdaea67d47278 /src/gallium/drivers/llvmpipe/lp_setup.c | |
parent | 2cad62475b8263472f6fbd541b5b8ec2a1d40e62 (diff) |
llvmpipe: get 3D texture image stride from an array rather than computing it
This fixes broken 3D texture indexing when the height of the 3D texture
was less than 64 (the tile size). It's simpler to pass this as an array
(as we do with the row stride) than to compute it on the fly.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 065b4b6a6a3..1bd5f57412e 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -534,7 +534,8 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup, llvmpipe_get_texture_image_all(lp_tex, j, LP_TEX_USAGE_READ, LP_TEX_LAYOUT_LINEAR); #endif - jit_tex->row_stride[j] = lp_tex->stride[j]; + jit_tex->row_stride[j] = lp_tex->row_stride[j]; + jit_tex->img_stride[j] = lp_tex->img_stride[j]; } } else { @@ -547,7 +548,8 @@ lp_setup_set_fragment_sampler_views(struct lp_setup_context *setup, struct sw_winsys *winsys = screen->winsys; jit_tex->data[0] = winsys->displaytarget_map(winsys, lp_tex->dt, PIPE_TRANSFER_READ); - jit_tex->row_stride[0] = lp_tex->stride[0]; + jit_tex->row_stride[0] = lp_tex->row_stride[0]; + jit_tex->img_stride[0] = lp_tex->img_stride[0]; assert(jit_tex->data[0]); } } |