summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-05-10 10:59:39 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-07-22 18:56:53 +0100
commit3765aa3cb9f791d6da0c5fddc880c370460158d6 (patch)
tree2db16264cc68236632742c1790b25beb6e08c5b1
parent36a7cbacea655ed6dfb986c55e30834737bd5c67 (diff)
Massage server fbconfigs to make them more likely to match swrast's fbconfigs10.2.4-patches
- Ignore server performance caveats (doesn't make a great deal of sense to match those) - Ignore server aux buf count (swrast doesn't provide any, but the server may provide them for all fbconfigs)
-rw-r--r--src/glx/dri_common.c3
-rw-r--r--src/glx/drisw_glx.c27
2 files changed, 30 insertions, 0 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index 8bf47054a3..dd784502fa 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -294,6 +294,9 @@ driConfigEqual(const __DRIcoreExtension *core,
break;
case __DRI_ATTRIB_CONFIG_CAVEAT:
+ if (config->visualRating == GLX_DONT_CARE)
+ break;
+
if (value & __DRI_ATTRIB_NON_CONFORMANT_CONFIG)
glxValue = GLX_NON_CONFORMANT_CONFIG;
else if (value & __DRI_ATTRIB_SLOW_BIT)
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index fcb5d8f578..ddfdcd4986 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -730,6 +730,33 @@ driswCreateScreen(int screen, struct glx_display *priv)
extensions = psc->core->getExtensions(psc->driScreen);
driswBindExtensions(psc, extensions);
+ /* XXX: is this no good for upstream as it would change the fbconfigs seen
+ by DRI2/3, it should work on a copy of the fbconfigs instead ??? */
+ for (struct glx_config *m = psc->base.configs; m; m = m->next) {
+ /* We will ignore any server performance caveats, since they don't
+ affect swrast performance */
+ m->visualRating = GLX_DONT_CARE;
+
+ /* swrast doesn't provide any aux buffers, but XWin may (with some
+ drivers) provide them for all configs, so set the number to zero.
+
+ This could potentially create duplicate fbconfigs, but that isn't
+ forbidden. */
+ m->numAuxBuffers = 0;
+ }
+
+ for (struct glx_config *m = psc->base.visuals; m; m = m->next) {
+ m->visualRating = GLX_DONT_CARE;
+ m->numAuxBuffers = 0;
+ }
+
+ for (struct glx_config *m = psc->base.configs; m; m = m->next) {
+
+ }
+ for (struct glx_config *m = psc->base.visuals; m; m = m->next) {
+
+ }
+
configs = driConvertConfigs(psc->core, psc->base.configs, driver_configs);
visuals = driConvertConfigs(psc->core, psc->base.visuals, driver_configs);