Bug 39537 - Build error at get vlVaGetVtable
Summary: Build error at get vlVaGetVtable
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: Other Linux (All)
: medium enhancement
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-26 01:15 UTC by Heiher
Modified: 2011-07-26 04:37 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Heiher 2011-07-26 01:15:27 UTC
From ac5c4c49e38b57a47b8dda0e77312ea6e4e7f99d Mon Sep 17 00:00:00 2001
From: Heiher <admin@heiher.info>
Date: Tue, 26 Jul 2011 16:11:30 +0800
Subject: [PATCH] Fix vlVaGetVtable

---
 src/gallium/state_trackers/va/ftab.c       |    4 ++--
 src/gallium/state_trackers/va/va_private.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/state_trackers/va/ftab.c b/src/gallium/state_trackers/va/ftab.c
index dc9513e..b2545e9 100644
--- a/src/gallium/state_trackers/va/ftab.c
+++ b/src/gallium/state_trackers/va/ftab.c
@@ -130,7 +130,7 @@ static struct VADriverVTable vtable =
    NULL /* struct VADriverVTableGLX *glx; "Optional" */
 };
 
-struct VADriverVTable vlVaGetVtable()
+struct VADriverVTable * vlVaGetVtable()
 {
-   return vtable;
+   return &vtable;
 }
diff --git a/src/gallium/state_trackers/va/va_private.h b/src/gallium/state_trackers/va/va_private.h
index f1023db..a382e05 100644
--- a/src/gallium/state_trackers/va/va_private.h
+++ b/src/gallium/state_trackers/va/va_private.h
@@ -61,7 +61,7 @@ typedef struct {
 VAStatus __vaDriverInit_0_31 (VADriverContextP ctx);
 
 // Private functions:
-struct VADriverVTable vlVaGetVtable();
+struct VADriverVTable * vlVaGetVtable();
 
 bool vlCreateHTAB(void);
 void vlDestroyHTAB(void);
-- 
1.7.2.3
Comment 1 Christian König 2011-07-26 04:37:08 UTC
The va state tracker currently compiles only with VAAPI Version 0.31.

There is a check for that in configure.ac, your patch makes the state tracker build with VAAPI 0.32, but also breaks building with VAAPI 0.31.

If you want to really fix that (which would be very welcome), you need to add something like:
#if VA_CHECK_VERSION(0,32,0)
...
#else
...
#endif

So please fix your patch and resubmit it to the mailing list.

Thanks,
Christian.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.