mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
gallium: fix clipping/stride bugs in pipe_get_tile_raw(), pipe_put_tile_raw()
We need to compute the default dst_stride and src_stride _before_ clipping. After clipping, the width value may have changed. This fixes visible tile glitches in some demos like progs/glsl/texdemo.c
This commit is contained in:
parent
be66a8f431
commit
a56ccb90c6
1 changed files with 6 additions and 6 deletions
|
|
@ -51,12 +51,12 @@ pipe_get_tile_raw(struct pipe_surface *ps,
|
|||
{
|
||||
const void *src;
|
||||
|
||||
if (pipe_clip_tile(x, y, &w, &h, ps))
|
||||
return;
|
||||
|
||||
if (dst_stride == 0)
|
||||
dst_stride = pf_get_nblocksx(&ps->block, w) * ps->block.size;
|
||||
|
||||
if (pipe_clip_tile(x, y, &w, &h, ps))
|
||||
return;
|
||||
|
||||
src = pipe_surface_map(ps, PIPE_BUFFER_USAGE_CPU_READ);
|
||||
assert(src);
|
||||
if(!src)
|
||||
|
|
@ -79,12 +79,12 @@ pipe_put_tile_raw(struct pipe_surface *ps,
|
|||
{
|
||||
void *dst;
|
||||
|
||||
if (pipe_clip_tile(x, y, &w, &h, ps))
|
||||
return;
|
||||
|
||||
if (src_stride == 0)
|
||||
src_stride = pf_get_nblocksx(&ps->block, w) * ps->block.size;
|
||||
|
||||
if (pipe_clip_tile(x, y, &w, &h, ps))
|
||||
return;
|
||||
|
||||
dst = pipe_surface_map(ps, PIPE_BUFFER_USAGE_CPU_WRITE);
|
||||
assert(dst);
|
||||
if(!dst)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue