diff options
author | Younes Manton <[email protected]> | 2008-09-22 12:26:13 -0400 |
---|---|---|
committer | Younes Manton <[email protected]> | 2008-10-04 13:12:09 -0400 |
commit | d008fb178631aecacc07aeec66299748470fd8c7 (patch) | |
tree | 28fee25a9fa49e092b80ccae71aec132b5384f07 /src/gallium/state_trackers/g3dvl | |
parent | 111b8f6dd9c97cd30979c8d5f56244e1e6ed60a2 (diff) |
g3dvl: Ignore client flush requests unless entire frame is buffered.
Diffstat (limited to 'src/gallium/state_trackers/g3dvl')
-rw-r--r-- | src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c | 10 | ||||
-rw-r--r-- | src/gallium/state_trackers/g3dvl/vl_surface.c | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c b/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c index 62107803ac0..e7a070ef4df 100644 --- a/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c +++ b/src/gallium/state_trackers/g3dvl/vl_r16snorm_mc_buf.c @@ -576,6 +576,9 @@ static int vlFlush unsigned int num_macroblocks[vlNumMacroBlockExTypes] = {0}; unsigned int offset[vlNumMacroBlockExTypes]; unsigned int vb_start = 0; + unsigned int mbw; + unsigned int mbh; + unsigned int num_mb_per_frame; unsigned int i; assert(render); @@ -585,6 +588,13 @@ static int vlFlush if (!mc->buffered_surface) return 0; + mbw = align(mc->picture_width, VL_MACROBLOCK_WIDTH) / VL_MACROBLOCK_WIDTH; + mbh = align(mc->picture_height, VL_MACROBLOCK_HEIGHT) / VL_MACROBLOCK_HEIGHT; + num_mb_per_frame = mbw * mbh; + + if (mc->num_macroblocks < num_mb_per_frame) + return 0; + pipe = mc->pipe; for (i = 0; i < mc->num_macroblocks; ++i) diff --git a/src/gallium/state_trackers/g3dvl/vl_surface.c b/src/gallium/state_trackers/g3dvl/vl_surface.c index 6648133ef83..076bd40d414 100644 --- a/src/gallium/state_trackers/g3dvl/vl_surface.c +++ b/src/gallium/state_trackers/g3dvl/vl_surface.c @@ -179,6 +179,7 @@ int vlSurfaceGetStatus } *status = vlResourceStatusFree; + return 0; } |