<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Jan 11, 2018 7:14 AM, "Mario Kleiner" <<a href="mailto:mario.kleiner.de@gmail.com">mario.kleiner.de@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">On 01/10/2018 07:04 AM, Tapani Pälli wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Marek;<br>
<br>
This one works but only if you add<br>
<br>
DRI_CONF_ALLOW_RGB10_CONFIGS("<wbr>false")<br>
<br>
to the DRI_CONF_SECTION_MISCELLANEOUS section in intel_screen. With that change: Reviewed-by: Tapani Pälli <<a href="mailto:tapani.palli@intel.com" target="_blank">tapani.palli@intel.com</a>><br>
<br>
</blockquote>
<br></div>
With this patch now committed to master, rgb10 visuals on i965 are completely dead, as far as my testing goes. rgb10 is always off, and the 'allow_rgb10_configs' option in drirc gets ignored for enumeration of visuals/fbconfigs, e.g., in glxinfo.<br>
<br>
Before it worked on my machines, defaulted to on, and could be controlled via drirc.<br>
<br>
As far as i can see, setting up &screen->optionCache for i965 happens too late, only at glXCreateContext() time -> brwCreateContext() -> brw_process_driconf_options().<br>
<br>
The old way read the options file as part of driCreateNewScreen2(), which was called as part of __glXInitialize, e.g., from glXChooseVisual() -- early enough to affect the enumeration/selection of visuals.<br>
<br>
So i don't know if the old way was the right way, but it did give the right behavior for i965 whereas the new one doesn't.<br>
<br>
Ideas?<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">I think that's not completely true. I965 loads drirc options for each screen and then again for each context, which is weird.</div><div dir="auto"><br></div><div dir="auto">Generally, the screen object isn't allowed to be modified by glXCreateContext.</div><div dir="auto"><br></div><div dir="auto">Marek</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-mario<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">
<br>
On 01/09/2018 04:04 PM, Marek Olšák wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: Marek Olšák <<a href="mailto:marek.olsak@amd.com" target="_blank">marek.olsak@amd.com</a>><br>
<br>
This is unused because it's for libGL/libEGL, not drivers.<br>
<br>
v2: i965 was wrong, because it used dri_util instead of its own config.<br>
---<br>
  src/mesa/drivers/dri/common/dr<wbr>i_util.c   | 4 ----<br>
  src/mesa/drivers/dri/i965/inte<wbr>l_screen.c | 2 +-<br>
  2 files changed, 1 insertion(+), 5 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/common/<wbr>dri_util.c b/src/mesa/drivers/dri/common/<wbr>dri_util.c<br>
index d4fba0b..e6a7d23 100644<br>
--- a/src/mesa/drivers/dri/common/<wbr>dri_util.c<br>
+++ b/src/mesa/drivers/dri/common/<wbr>dri_util.c<br>
@@ -48,24 +48,20 @@<br>
  #include "main/version.h"<br>
  #include "main/debug_output.h"<br>
  #include "main/errors.h"<br>
  #include "main/macros.h"<br>
  const char __dri2ConfigOptions[] =<br>
     DRI_CONF_BEGIN<br>
        DRI_CONF_SECTION_PERFORMANCE<br>
           DRI_CONF_VBLANK_MODE(DRI_CONF_<wbr>VBLANK_DEF_INTERVAL_1)<br>
        DRI_CONF_SECTION_END<br>
-<br>
-      DRI_CONF_SECTION_MISCELLANEOUS<br>
-         DRI_CONF_ALLOW_RGB10_CONFIGS("<wbr>true")<br>
-      DRI_CONF_SECTION_END<br>
     DRI_CONF_END;<br>
  /*****************************<wbr>******************************<wbr>******/<br>
  /** \name Screen handling functions                     <wbr>         */<br>
  /*****************************<wbr>******************************<wbr>******/<br>
  /*@{*/<br>
  static void<br>
  setupLoaderExtensions(__DRIscr<wbr>een *psp,<br>
                const __DRIextension **extensions)<br>
diff --git a/src/mesa/drivers/dri/i965/in<wbr>tel_screen.c b/src/mesa/drivers/dri/i965/in<wbr>tel_screen.c<br>
index 3e016b5..89db821 100644<br>
--- a/src/mesa/drivers/dri/i965/in<wbr>tel_screen.c<br>
+++ b/src/mesa/drivers/dri/i965/in<wbr>tel_screen.c<br>
@@ -2057,21 +2057,21 @@ intel_screen_make_configs(__DR<wbr>Iscreen *dri_screen)<br>
     __DRIconfig **configs = NULL;<br>
     /* Expose only BGRA ordering if the loader doesn't support RGBA ordering. */<br>
     unsigned num_formats;<br>
     if (intel_loader_get_cap(dri_scre<wbr>en, DRI_LOADER_CAP_RGBA_ORDERING))<br>
        num_formats = ARRAY_SIZE(formats);<br>
     else<br>
        num_formats = ARRAY_SIZE(formats) - 2; /* all - RGBA_ORDERING formats */<br>
     /* Shall we expose 10 bpc formats? */<br>
-   bool allow_rgb10_configs = driQueryOptionb(&dri_screen->o<wbr>ptionCache,<br>
+   bool allow_rgb10_configs = driQueryOptionb(&screen->optio<wbr>nCache,<br>
                              <wbr>                  "allow_rgb10_configs");<br>
     /* Generate singlesample configs without accumulation buffer. */<br>
     for (unsigned i = 0; i < num_formats; i++) {<br>
        __DRIconfig **new_configs;<br>
        int num_depth_stencil_bits = 2;<br>
        if (!allow_rgb10_configs &&<br>
            (formats[i] == MESA_FORMAT_B10G10R10A2_UNORM ||<br>
             formats[i] == MESA_FORMAT_B10G10R10X2_UNORM)<wbr>)<br>
<br>
</blockquote></div>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote>
</blockquote></div><br></div></div></div>