[Mesa-dev] [PATCH] r600g: fix UVD detection
Grigori Goronzy
greg at chown.ath.cx
Mon Sep 30 01:53:43 PDT 2013
UVD was checked before the info fields were initialized. Introduced
by commit 68f6dec32.
---
src/gallium/drivers/r600/r600_pipe.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 097a6b8..32df2a3 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -1037,6 +1037,13 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
rscreen->b.b.fence_signalled = r600_fence_signalled;
rscreen->b.b.fence_finish = r600_fence_finish;
rscreen->b.b.get_driver_query_info = r600_get_driver_query_info;
+ r600_init_screen_resource_functions(&rscreen->b.b);
+
+ if (!r600_common_screen_init(&rscreen->b, ws)) {
+ FREE(rscreen);
+ return NULL;
+ }
+
if (rscreen->b.info.has_uvd) {
rscreen->b.b.get_video_param = ruvd_get_video_param;
rscreen->b.b.is_video_format_supported = ruvd_is_format_supported;
@@ -1044,12 +1051,6 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws)
rscreen->b.b.get_video_param = r600_get_video_param;
rscreen->b.b.is_video_format_supported = vl_video_buffer_is_format_supported;
}
- r600_init_screen_resource_functions(&rscreen->b.b);
-
- if (!r600_common_screen_init(&rscreen->b, ws)) {
- FREE(rscreen);
- return NULL;
- }
rscreen->b.debug_flags |= debug_get_flags_option("R600_DEBUG", r600_debug_options, 0);
if (debug_get_bool_option("R600_DEBUG_COMPUTE", FALSE))
--
1.8.1.2
More information about the mesa-dev
mailing list