diff options
author | Jerome Glisse <[email protected]> | 2010-07-27 20:15:17 -0400 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-07-27 20:18:32 -0400 |
commit | 641c9adb09e8707f659d42be600d16902ebf8895 (patch) | |
tree | db9200b3266bbc931c2b2636ca31fe5c158b80a5 /src/gallium/drivers/r600/r600_texture.c | |
parent | 25472942c9640f6c0d252de2f013d04ac2355b1d (diff) |
r600g: texture support
Add texture mapping support, redbook/texbind works if
you comment out glClear and second checkboard. Need to
fix :
- texture overwritting
- lod & mip/map handling
- unormalized coordinate handling
- texture view with first leve > 0
- and many other things
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 903cfad80a8..1c219a55799 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -31,7 +31,9 @@ #include <util/u_memory.h> #include "state_tracker/drm_driver.h" #include "r600_screen.h" +#include "r600_context.h" #include "r600_texture.h" +#include "r600d.h" extern struct u_resource_vtbl r600_texture_vtbl; @@ -69,6 +71,8 @@ static void r600_setup_miptree(struct r600_screen *rscreen, struct r600_texture rtex->offset[i] = offset; rtex->layer_size[i] = layer_size; rtex->pitch[i] = stride / util_format_get_blocksize(ptex->format); + rtex->pitch[i] += R600_TEXEL_PITCH_ALIGNMENT_MASK; + rtex->pitch[i] &= ~R600_TEXEL_PITCH_ALIGNMENT_MASK; rtex->stride[i] = stride; offset += align(size, 32); } |