Commit bf2661d3 authored by Jean-Paul Saman's avatar Jean-Paul Saman

xvba-video-glx.c: Make sure there is only one texture to allocate.

parent d50d89d0
......@@ -47,7 +47,6 @@
#define DEBUG 1
#include "debug.h"
/* Define which Evergreen rendering workaround to use */
#define EVERGREEN_WORKAROUND (EVERGREEN_WORKAROUND_AUTODETECT)
......@@ -287,6 +286,8 @@ static void destroy_hw_image_glx(
)
{
unsigned int i;
assert(obj_image);
assert(obj_image->hw.glx);
if (!obj_image)
return;
......@@ -310,7 +311,7 @@ static void destroy_hw_image_glx(
hwi->shader = NULL;
}
free(hwi);
free(obj_image->hw.glx);
obj_image->hw.glx = NULL;
}
......@@ -364,8 +365,16 @@ create_hw_image_glx(
return VA_STATUS_ERROR_INVALID_IMAGE;
}
unsigned int i;
/* FIXME: gl_create_texture() only allocates one
* texture at a time. According to GL information
* found on google you MUST glGetTextures() with
* the entire texture array at once and not one at
* a time as is done in this function */
ASSERT(hwi->num_textures == 1);
hwi->target = GL_TEXTURE_2D;
unsigned int i;
for (i = 0; i < hwi->num_textures; i++) {
hwi->textures[i] = gl_create_texture(
hwi->target,
......@@ -584,6 +593,7 @@ render_subpictures(
if (status != VA_STATUS_SUCCESS)
return status;
}
return VA_STATUS_SUCCESS;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment