Mesa (master): vl/buffers: consistent use on VL_MAX_SURFACES
Christian König
deathsimple at kemper.freedesktop.org
Mon Aug 19 16:32:25 UTC 2013
Module: Mesa
Branch: master
Commit: b9d1173f2cc2be7694eacaf19db3632be638a66d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9d1173f2cc2be7694eacaf19db3632be638a66d
Author: Emil Velikov <emil.l.velikov at gmail.com>
Date: Sat Aug 17 15:38:38 2013 +0100
vl/buffers: consistent use on VL_MAX_SURFACES
Reviewed-by: Christian König <christian.koenig at amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/gallium/auxiliary/vl/vl_video_buffer.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c
index e2cac0a..d2e9a04 100644
--- a/src/gallium/auxiliary/vl/vl_video_buffer.c
+++ b/src/gallium/auxiliary/vl/vl_video_buffer.c
@@ -259,7 +259,7 @@ vl_video_buffer_destroy(struct pipe_video_buffer *buffer)
pipe_resource_reference(&buf->resources[i], NULL);
}
- for (i = 0; i < VL_NUM_COMPONENTS * 2; ++i)
+ for (i = 0; i < VL_MAX_SURFACES; ++i)
pipe_surface_reference(&buf->surfaces[i], NULL);
vl_video_buffer_set_associated_data(buffer, NULL, NULL, NULL);
@@ -365,7 +365,7 @@ vl_video_buffer_surfaces(struct pipe_video_buffer *buffer)
array_size = buffer->interlaced ? 2 : 1;
for (i = 0, surf = 0; i < VL_NUM_COMPONENTS; ++i) {
for (j = 0; j < array_size; ++j, ++surf) {
- assert(surf < (VL_NUM_COMPONENTS * 2));
+ assert(surf < VL_MAX_SURFACES);
if (!buf->resources[i]) {
pipe_surface_reference(&buf->surfaces[surf], NULL);
@@ -386,7 +386,7 @@ vl_video_buffer_surfaces(struct pipe_video_buffer *buffer)
return buf->surfaces;
error:
- for (i = 0; i < (VL_NUM_COMPONENTS * 2); ++i )
+ for (i = 0; i < VL_MAX_SURFACES; ++i )
pipe_surface_reference(&buf->surfaces[i], NULL);
return NULL;
More information about the mesa-commit
mailing list