summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2013-12-07 22:02:11 -0800
committerIan Romanick <[email protected]>2013-12-13 08:19:50 -0800
commit38366c0c6e715314367b15680702e382d5c46a4a (patch)
tree2196c7c662ea9940d356aa9824e7959ff572eccb /src/mesa/drivers/dri/i915
parentd6c8365795c4fb1af83b79f26f782e0834f6bdfc (diff)
dri_util: Don't assume __DRIcontext->driverPrivate is a gl_context
The driverPrivate pointer is opaque to the driver and we can't assume it's a struct gl_context in dri_util.c. Instead provide a helper function to set the struct gl_context flags from the incoming DRI context flags. v2 (idr): Modify the other classic drivers to also use driContextSetFlags. I ran all the piglit GLX_ARB_create_context tests with i965 and classic swrast without regressions. Signed-off-by: Kristian Høgsberg <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ian Romanick <[email protected]> [v1] Reviewed-by: Eric Anholt <[email protected]> Tested-by: Ilia Mirkin <[email protected]> [v1 on Gallium nouveau] Cc: "10.0" <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.c3
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.h1
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c3
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.h1
-rw-r--r--src/mesa/drivers/dri/i915/intel_context.c1
-rw-r--r--src/mesa/drivers/dri/i915/intel_context.h1
-rw-r--r--src/mesa/drivers/dri/i915/intel_screen.c10
7 files changed, 14 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c
index b7553d87fdc..87d1a496ecc 100644
--- a/src/mesa/drivers/dri/i915/i830_context.c
+++ b/src/mesa/drivers/dri/i915/i830_context.c
@@ -56,6 +56,7 @@ i830CreateContext(int api,
__DRIcontext * driContextPriv,
unsigned major_version,
unsigned minor_version,
+ uint32_t flags,
unsigned *error,
void *sharedContextPrivate)
{
@@ -73,7 +74,7 @@ i830CreateContext(int api,
i830InitDriverFunctions(&functions);
if (!intelInitContext(intel, __DRI_API_OPENGL,
- major_version, minor_version,
+ major_version, minor_version, flags,
mesaVis, driContextPriv,
sharedContextPrivate, &functions,
error)) {
diff --git a/src/mesa/drivers/dri/i915/i830_context.h b/src/mesa/drivers/dri/i915/i830_context.h
index ab6222b56f0..4088480e644 100644
--- a/src/mesa/drivers/dri/i915/i830_context.h
+++ b/src/mesa/drivers/dri/i915/i830_context.h
@@ -183,6 +183,7 @@ i830CreateContext(int api,
__DRIcontext * driContextPriv,
unsigned major_version,
unsigned minor_version,
+ uint32_t flags,
unsigned *error,
void *sharedContextPrivate);
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index 5907e32b756..23890439ca5 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -151,6 +151,7 @@ i915CreateContext(int api,
__DRIcontext * driContextPriv,
unsigned major_version,
unsigned minor_version,
+ uint32_t flags,
unsigned *error,
void *sharedContextPrivate)
{
@@ -168,7 +169,7 @@ i915CreateContext(int api,
i915InitDriverFunctions(&functions);
- if (!intelInitContext(intel, api, major_version, minor_version,
+ if (!intelInitContext(intel, api, major_version, minor_version, flags,
mesaVis, driContextPriv,
sharedContextPrivate, &functions,
error)) {
diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h
index f5c15960dd0..7789ac28ee4 100644
--- a/src/mesa/drivers/dri/i915/i915_context.h
+++ b/src/mesa/drivers/dri/i915/i915_context.h
@@ -324,6 +324,7 @@ extern bool i915CreateContext(int api,
__DRIcontext * driContextPriv,
unsigned major_version,
unsigned minor_version,
+ uint32_t flags,
unsigned *error,
void *sharedContextPrivate);
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index 36188934fca..ac5d4ff240b 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -409,6 +409,7 @@ intelInitContext(struct intel_context *intel,
int api,
unsigned major_version,
unsigned minor_version,
+ uint32_t flags,
const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate,
diff --git a/src/mesa/drivers/dri/i915/intel_context.h b/src/mesa/drivers/dri/i915/intel_context.h
index e488ed1a677..c3dad9c291f 100644
--- a/src/mesa/drivers/dri/i915/intel_context.h
+++ b/src/mesa/drivers/dri/i915/intel_context.h
@@ -401,6 +401,7 @@ extern bool intelInitContext(struct intel_context *intel,
int api,
unsigned major_version,
unsigned minor_version,
+ uint32_t flags,
const struct gl_config * mesaVis,
__DRIcontext * driContextPriv,
void *sharedContextPrivate,
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
index 7f1fc6b89e2..d607f477d84 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -931,6 +931,7 @@ i830CreateContext(int api,
__DRIcontext *driContextPriv,
unsigned major_version,
unsigned minor_version,
+ uint32_t flags,
unsigned *error,
void *sharedContextPrivate);
@@ -940,6 +941,7 @@ i915CreateContext(int api,
__DRIcontext *driContextPriv,
unsigned major_version,
unsigned minor_version,
+ uint32_t flags,
unsigned *error,
void *sharedContextPrivate);
@@ -971,13 +973,13 @@ intelCreateContext(gl_api api,
if (IS_9XX(intelScreen->deviceID)) {
success = i915CreateContext(api, mesaVis, driContextPriv,
- major_version, minor_version, error,
- sharedContextPrivate);
+ major_version, minor_version, flags,
+ error, sharedContextPrivate);
} else {
intelScreen->no_vbo = true;
success = i830CreateContext(api, mesaVis, driContextPriv,
- major_version, minor_version, error,
- sharedContextPrivate);
+ major_version, minor_version, flags,
+ error, sharedContextPrivate);
}
if (success)