diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-05-08 12:43:30 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-05-08 12:43:30 +0800 |
commit | 548d4c0f979a72eac5d0c9c76da12f0bd05e64e1 (patch) | |
tree | 42f49ee4fb1de2e8904f05fd6c0016353aa62b4e /src | |
parent | 9f324860431ff8199a78d19bbaa74046e1476b89 (diff) |
Fix i965 render getting dest format error
Depend on value returned by function within assert is wrong.
Fixed weird render corrupt on i965.
Diffstat (limited to 'src')
-rw-r--r-- | src/i965_render.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/i965_render.c b/src/i965_render.c index 3c553de1..4a8f9b86 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -858,8 +858,10 @@ i965_set_picture_surface_state(ScrnInfoPtr pScrn, struct brw_surface_state *ss, local_ss.ss0.surface_type = BRW_SURFACE_2D; if (is_dst) { uint32_t dst_format; + Bool ret = TRUE; - assert(i965_get_dest_format(pPicture, &dst_format) == TRUE); + ret = i965_get_dest_format(pPicture, &dst_format); + assert(ret == TRUE); local_ss.ss0.surface_format = dst_format; } else { local_ss.ss0.surface_format = i965_get_card_format(pPicture); @@ -883,7 +885,7 @@ i965_set_picture_surface_state(ScrnInfoPtr pScrn, struct brw_surface_state *ss, local_ss.ss2.width = pPixmap->drawable.width - 1; local_ss.ss3.pitch = intel_get_pixmap_pitch(pPixmap) - 1; local_ss.ss3.tile_walk = 0; /* Tiled X */ - local_ss.ss3.tiled_surface = i830_pixmap_tiled(pPixmap); + local_ss.ss3.tiled_surface = i830_pixmap_tiled(pPixmap) ? 1 : 0; memcpy(ss, &local_ss, sizeof(local_ss)); |