r300g: rework resource_copy_region, not changing pipe_resource
authorMarek Olšák <maraeo@gmail.com>
Thu, 29 Dec 2011 17:18:38 +0000 (18:18 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sun, 1 Jan 2012 10:47:05 +0000 (11:47 +0100)
commitce9d61fec64138ebf8d0bec2511e66593297b7d5
tree3e60c2743b8df17392415e7d22b0e10446343624
parentce31970af16558ebd60cfae33c000252bc3e1cbf
r300g: rework resource_copy_region, not changing pipe_resource

Changing pipe_resource was wrong, because it can be used by other contexts
at the same time. This fixes the last possible race condition in r300g
that I know of.

This also fixes blitting NPOT compressed textures. Random pixels sometimes
appeared at the right-hand edge of the texture.

Finally, this removes r300_texture_desc::stride_in_pixels. It makes little
sense with sampler views and surfaces being able to override width0, height0,
and the format entirely.
src/gallium/drivers/r300/r300_blit.c
src/gallium/drivers/r300/r300_context.h
src/gallium/drivers/r300/r300_state.c
src/gallium/drivers/r300/r300_state_derived.c
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/r300/r300_texture.h
src/gallium/drivers/r300/r300_texture_desc.c
src/gallium/drivers/r300/r300_texture_desc.h
src/gallium/drivers/r300/r300_transfer.c