summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i965simple/brw_wm_surface_state.c
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-06-27 19:37:56 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-06-27 19:37:56 +0900
commit4ddd65967915ca4846f2831bc676c878a29dae4a (patch)
treef2c66e355d5e9ea6f80531f995ccc25166d06fc3 /src/gallium/drivers/i965simple/brw_wm_surface_state.c
parent05cfb4c4b84b4e3119112c381ceffc583a4ef5fe (diff)
gallium: Drop pipe_texture->cpp and pipe_surface->cpp.
The chars-per-pixel concept falls apart with compressed and yuv images, where more than one pixel are coded in a single data block.
Diffstat (limited to 'src/gallium/drivers/i965simple/brw_wm_surface_state.c')
-rw-r--r--src/gallium/drivers/i965simple/brw_wm_surface_state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/i965simple/brw_wm_surface_state.c b/src/gallium/drivers/i965simple/brw_wm_surface_state.c
index 69e56dc8bd..1a326f9918 100644
--- a/src/gallium/drivers/i965simple/brw_wm_surface_state.c
+++ b/src/gallium/drivers/i965simple/brw_wm_surface_state.c
@@ -160,7 +160,7 @@ void brw_update_texture_surface( struct brw_context *brw,
surf.ss3.tile_walk = BRW_TILEWALK_XMAJOR;
surf.ss3.tiled_surface = 0; /* always zero */
- surf.ss3.pitch = tObj->pitch - 1;
+ surf.ss3.pitch = tObj->stride - 1;
surf.ss3.depth = tObj->base.depth[0] - 1;
surf.ss4.min_lod = 0;
@@ -197,7 +197,7 @@ static void upload_wm_surfaces(struct brw_context *brw )
memset(&surf, 0, sizeof(surf));
if (pipe_surface != NULL) {
- if (pipe_surface->cpp == 4)
+ if (pipe_surface->block.size == 4)
surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
else
surf.ss0.surface_format = BRW_SURFACEFORMAT_B5G6R5_UNORM;
@@ -210,7 +210,7 @@ static void upload_wm_surfaces(struct brw_context *brw )
surf.ss2.height = pipe_surface->height - 1;
surf.ss3.tile_walk = BRW_TILEWALK_XMAJOR;
surf.ss3.tiled_surface = 0;
- surf.ss3.pitch = (pipe_surface->pitch * pipe_surface->cpp) - 1;
+ surf.ss3.pitch = pipe_surface->stride - 1;
} else {
surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
surf.ss0.surface_type = BRW_SURFACE_NULL;