[Mesa-dev] [PATCH 1/5] egl/android: Declare loop vars inside their loops

2017-06-16 Thread Chad Versace
That is, consistently do this: for (int i = 0; ...) No behavioral change. --- src/egl/drivers/dri2/platform_android.c | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/egl/drivers/dri2/platform_android.c

[Mesa-dev] [PATCH 4/5] egl/android: Pull invariant var outside of loop

2017-06-16 Thread Chad Versace
This makes the nested loops in droid_add_configs_for_visuals() easier to read. No behavioral change. --- src/egl/drivers/dri2/platform_android.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/egl/drivers/dri2/platform_android.c

[Mesa-dev] [PATCH 5/5] egl/android: Change order of EGLConfig generation

2017-06-16 Thread Chad Versace
Many Android apps (such as Google's official NDK GLES2 example app), and even portions the core framework code (such as SystemServiceManager in Nougat), incorrectly choose their EGLConfig. They neglect to match the EGLConfig's EGL_NATIVE_VISUAL_ID against the window's native format, and instead

[Mesa-dev] [PATCH 3/5] egl/android: Rename var in droid_add_configs_for_visuals()

2017-06-16 Thread Chad Versace
Rename 'config' to 'config_count'. I didn't understand what the variable did until I untangled the for-loops. Now the next person won't have that problem. --- src/egl/drivers/dri2/platform_android.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[Mesa-dev] [PATCH 2/5] egl/android: Declare 'const' the EGLConfig attribs template array

2017-06-16 Thread Chad Versace
No behavioral change. Just a cleanup. Post-patch, we no longer modify the same array on each iteration of the inner loop of droid_add_configs_for_visuals(). Instead, we just declare the array as const inside the inner loop. --- src/egl/drivers/dri2/platform_android.c | 16 +++- 1

[Mesa-dev] [PATCH 0/5] egl/android: Change order of EGLConfig generation

2017-06-16 Thread Chad Versace
, this was good enough to pacify the buggy clients. This patch series lives on a git tag: http://git.kiwitree.net/cgit/~chadv/mesa/tag/?h=chadv/review/2017-06-16/egl-android-config-order-v01 Chad Versace (5): egl/android: Declare loop vars inside their loops egl/android: Declare 'const

Re: [Mesa-dev] [RFC 13/22] RFC: vulkan: Update registry for MESAX dma_buf extensions

2017-06-16 Thread Chad Versace
On Fri 16 Jun 2017, Emil Velikov wrote: > Hi gents, > > On 8 June 2017 at 19:44, Daniel Stone wrote: > > > - VK_MESAX_external_memory_dma_buf > > - VK_MESAX_external_image_dma_buf > Perhaps not so crazy idea: > > Considering a handful of the people involved

Re: [Mesa-dev] [PATCH 0/6] i965: Add RGBX, RGBA configs, even on gen9

2017-06-16 Thread Chad Versace
On Thu 15 Jun 2017, Rob Herring wrote: > On Tue, Jun 13, 2017 at 1:55 PM, Chad Versace <chadvers...@chromium.org> > wrote: > > On Fri 09 Jun 2017, Tapani Pälli wrote: > >> > >> > >> On 06/08/2017 09:27 PM, Chad Versace wrote: > >> > On T

Re: [Mesa-dev] [RFC 00/22] DRI3 v1.1, ANV dmabuf

2017-06-14 Thread Chad Versace
On Thu 08 Jun 2017, Jason Ekstrand wrote: > On Thu, Jun 8, 2017 at 11:43 AM, Daniel Stone wrote: > > > Hi, > > With full support for modifiers in DRIimage, this patch series adds > > support for fully plumbing them through X11. A patchset proposing > > an extension to DRI3

Re: [Mesa-dev] [RFC 11/22] anv: Handle failure in make_hiz_surface_maybe()

2017-06-14 Thread Chad Versace
Jason, I recall that you disliked this patch. Is that correct? If so, why did you dislike it? On Thu 08 Jun 2017, Daniel Stone wrote: > From: Chad Versace <chadvers...@chromium.org> > > make_ccs_surface_maybe() correctly handles failure > isl_surf_get_ccs_surf(). When it fa

Re: [Mesa-dev] [RFC 02/22] intel/isl: Add ISL <-> DRM modifier conversion

2017-06-14 Thread Chad Versace
On Thu 08 Jun 2017, Daniel Stone wrote: > From: Chad Versace <chadvers...@chromium.org> > > It converts a DRM format modifier to and from enum isl_tiling and > aux_usage. That's all. > > Signed-off-by: Daniel Stone <dani...@collabora.com> > --- > src/intel

Re: [Mesa-dev] [PATCH 0/6] i965: Add RGBX, RGBA configs, even on gen9

2017-06-13 Thread Chad Versace
On Fri 09 Jun 2017, Tapani Pälli wrote: > > > On 06/08/2017 09:27 PM, Chad Versace wrote: > > On Thu 08 Jun 2017, Tomasz Figa wrote: > > > On Thu, Jun 8, 2017 at 4:08 PM, Tapani Pälli <tapani.pa...@intel.com> > > > wrote: > > > >

Re: [Mesa-dev] [RFC 00/22] DRI3 v1.1, ANV dmabuf

2017-06-13 Thread Chad Versace
On Thu 08 Jun 2017, Daniel Stone wrote: > Hi, > With full support for modifiers in DRIimage, this patch series adds > support for fully plumbing them through X11. A patchset proposing > an extension to DRI3 to support multiple planes and modifiers can > be found here: >

Re: [Mesa-dev] [PATCH] egl: fix _eglQuerySurface in EGL_BUFFER_AGE_EXT case

2017-06-08 Thread Chad Versace
gt; src/egl/drivers/dri2/platform_drm.c | 2 +- > src/egl/main/eglsurface.c | 6 +- > 3 files changed, 8 insertions(+), 4 deletions(-) Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] [PATCH 0/6] i965: Add RGBX, RGBA configs, even on gen9

2017-06-08 Thread Chad Versace
On Thu 08 Jun 2017, Tomasz Figa wrote: > On Thu, Jun 8, 2017 at 4:08 PM, Tapani Pälli <tapani.pa...@intel.com> wrote: > > > > On 06/08/2017 09:36 AM, Tapani Pälli wrote: > >> > >> > >> > >> On 06/08/2017 06:05 AM, Tomasz Figa wrote:

Re: [Mesa-dev] [PATCH 6/6] i965/dri: Support R8G8B8A8 and R8G8B8X8 configs

2017-06-08 Thread Chad Versace
On Thu 08 Jun 2017, Rob Herring wrote: > On Tue, Jun 6, 2017 at 3:37 PM, Chad Versace <chadvers...@chromium.org> wrote: > > The Android framework requires support for EGLConfigs with > > HAL_PIXEL_FORMAT_RGBX_ and HAL_PIXEL_FORMAT_RGBA_. > > > > Even tho

Re: [Mesa-dev] [PATCH 2/6] i965: Add a RGBX->RGBA fallback for glEGLImageTextureTarget2D()

2017-06-07 Thread Chad Versace
On Tue 06 Jun 2017, Daniel Stone wrote: > Hi Chad, > > On 6 June 2017 at 21:36, Chad Versace <chadvers...@chromium.org> wrote: > > @@ -254,8 +255,22 @@ create_mt_for_dri_image(struct brw_context *brw, > > struct gl_context *ctx = >ctx; > > struct int

Re: [Mesa-dev] [PATCH 1/6] mesa: Add _mesa_format_fallback_rgba_to_rgbx()

2017-06-07 Thread Chad Versace
On Tue 06 Jun 2017, Dylan Baker wrote: > Quoting Chad Versace (2017-06-06 15:11:18) > > On Tue 06 Jun 2017, Dylan Baker wrote: > > > Quoting Chad Versace (2017-06-06 13:36:55) > > > > +write_preamble(stdout) > > > > +write_func_mesa_fo

Re: [Mesa-dev] [PATCH 00/30] i965: Overhaul resolves

2017-06-07 Thread Chad Versace
On Fri 26 May 2017, Jason Ekstrand wrote: > This patch series does a complete overhaul of the current resolve handling > framework inside the i916 OpenGL driver. I've ran out of time to review the remainder of the series. I believe I skipped patches 24-30. You can add my acked-by to those patches

Re: [Mesa-dev] [PATCH 23/30] i965: Move depth to the new resolve functions

2017-06-07 Thread Chad Versace
writing correct code to handle aux state transitions is now relatively effortless. Patch 23 is Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 22/30] i965: Move images to the new resolve functions

2017-06-07 Thread Chad Versace
ns(-) Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 21/30] i965: Move framebuffer fetch to the new resolve functions

2017-06-07 Thread Chad Versace
Patches 20 and 21 are Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 19/30] i965: Move color rendering to the new resolve functions

2017-06-07 Thread Chad Versace
; > most of the performance regressions in this series. Making it > > unconditional meant we flushed the render cache on every draw call. It's a > > bit surprising that doing so didn't hurt things any worse than it did. It > > was originally put in to satisfy the requirements about

Re: [Mesa-dev] [PATCH 18/30] i965: Move texturing to the new resolve functions

2017-06-07 Thread Chad Versace
ck tick] In general, the GL spec claims undefined behavior when simultaneuosly sampling and rendering to the same buffer. Self-blits are legal, though. So, it seems to me that intel_disable_rb_aux_buffer() is applicable here only during a glBlit* when src and dest are the same. Is that co

Re: [Mesa-dev] [PATCH 15/30] i965/miptree: Add new entrypoints for resolve management

2017-06-06 Thread Chad Versace
On Fri 26 May 2017, Jason Ekstrand wrote: > This commit adds a new unified interface for doing resolves. The basic > format is that, prior to any surface access such as texturing or > rendering, you call intel_miptree_prepare_access. If the surface was > written, you call

Re: [Mesa-dev] [PATCH 16/30] i965: Use the new resolve function for several simple cases

2017-06-06 Thread Chad Versace
8 files changed, 38 insertions(+), 26 deletions(-) Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 15/30] i965/miptree: Add new entrypoints for resolve management

2017-06-06 Thread Chad Versace
5/intel_mipmap_tree.c | 156 > +- > src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 80 + > 2 files changed, 232 insertions(+), 4 deletions(-) Modulo the errant whitespace changes Topi pointed out, which should be squashed into an earlier patch, thi

Re: [Mesa-dev] [PATCH 14/30] intel/isl: Add an enum for describing auxiliary compression state

2017-06-06 Thread Chad Versace
On Tue 06 Jun 2017, Jason Ekstrand wrote: > On Tue, Jun 6, 2017 at 6:00 PM, Chad Versace <c...@kiwitree.net> wrote: > > > On Tue 06 Jun 2017, Jason Ekstrand wrote: > > > On Tue, Jun 6, 2017 at 1:32 PM, Jason Ekstrand <ja...@jlekstrand.net> > > wrote: >

Re: [Mesa-dev] [PATCH 14/30] intel/isl: Add an enum for describing auxiliary compression state

2017-06-06 Thread Chad Versace
On Tue 06 Jun 2017, Jason Ekstrand wrote: > On Tue, Jun 6, 2017 at 1:32 PM, Jason Ekstrand <ja...@jlekstrand.net> wrote: > > > On Tue, Jun 6, 2017 at 1:22 PM, Chad Versace <chadvers...@chromium.org> > > wrote: > > > >> On Fri 26 May 2017, Jason E

Re: [Mesa-dev] [PATCH 14/30] intel/isl: Add an enum for describing auxiliary compression state

2017-06-06 Thread Chad Versace
On Tue 06 Jun 2017, Jason Ekstrand wrote: > On Tue, Jun 6, 2017 at 1:22 PM, Chad Versace <chadvers...@chromium.org> > wrote: > > > On Fri 26 May 2017, Jason Ekstrand wrote: > > > This enum describes all of the states that a auxiliary compressed > > > surfa

Re: [Mesa-dev] [PATCH 3/4] configure.ac: remove unused Android specifics

2017-06-06 Thread Chad Versace
On Mon 05 Jun 2017, Emil Velikov wrote: > From: Emil Velikov <emil.veli...@collabora.com> > > The HAVE_ANDROID conditional has been unused as of commit 51accecce77 > ("mesa/dri: always link against shared glapi") and with that one gone we > no longer need the host d

Re: [Mesa-dev] [PATCH 1/6] mesa: Add _mesa_format_fallback_rgba_to_rgbx()

2017-06-06 Thread Chad Versace
On Tue 06 Jun 2017, Dylan Baker wrote: > Quoting Chad Versace (2017-06-06 13:36:55) > > The new function takes a mesa_format and, if the format is an alpha > > format with a non-alpha variant, returns the non-alpha format. > > Otherwise, it returns the original for

[Mesa-dev] [PATCH 0/6] i965: Add RGBX, RGBA configs, even on gen9

2017-06-06 Thread Chad Versace
;=9 in brw_surface_formats.c. This patch series safely (hopefully?) fixes that problem. If you want the meat, read patches 2 and 6. Chad Versace (6): mesa: Add _mesa_format_fallback_rgba_to_rgbx() i965: Add a RGBX->RGBA fallback for glEGLImageTextureTarget2D() i965: Rename some vague format m

[Mesa-dev] [PATCH 3/6] i965: Rename some vague format members of brw_context

2017-06-06 Thread Chad Versace
I'm swimming in a vortex of formats. Mesa formats, isl formats, DRI formats, GL formats, etc. It's easy to misinterpret the following brw_context members unless you've recently read their definition. In upcoming patches, I change them from embedded arrays to simple pointers; after that, even

[Mesa-dev] [PATCH 2/6] i965: Add a RGBX->RGBA fallback for glEGLImageTextureTarget2D()

2017-06-06 Thread Chad Versace
This enables support for importing RGBX EGLImage textures on Skylake. Chrome OS needs support for RGBX EGLImage textures because because the Android framework produces HAL_PIXEL_FORMAT_RGBX winsys surfaces, which the Chrome OS compositor consumes as dma_bufs. On hardware for which

[Mesa-dev] [PATCH 5/6] i965: Move brw_context format arrays to intel_screen

2017-06-06 Thread Chad Versace
This allows us to query the driver's supported formats in i965's DRI code, where often there is available a DRIscreen but no GL context. To reduce diff noise, this patch does not completely remove brw_context's format arrays. It just redeclares them as pointers which point to the arrays in

[Mesa-dev] [PATCH 6/6] i965/dri: Support R8G8B8A8 and R8G8B8X8 configs

2017-06-06 Thread Chad Versace
The Android framework requires support for EGLConfigs with HAL_PIXEL_FORMAT_RGBX_ and HAL_PIXEL_FORMAT_RGBA_. Even though all RGBX formats are disabled on gen9 by brw_surface_formats.c, the new configs work correctly on Broxton thanks to _mesa_format_fallback_rgbx_to_rgba(). On GLX, this

[Mesa-dev] [PATCH 4/6] i965/dri: Add intel_screen param to intel_create_winsys_renderbuffer

2017-06-06 Thread Chad Versace
The param is currently unused. It will later be used it to support R8G8B8X8 EGLConfigs on Skylake. --- src/mesa/drivers/dri/i965/intel_fbo.c| 8 +--- src/mesa/drivers/dri/i965/intel_fbo.h| 6 -- src/mesa/drivers/dri/i965/intel_screen.c | 14 -- 3 files changed, 17

[Mesa-dev] [PATCH 1/6] mesa: Add _mesa_format_fallback_rgba_to_rgbx()

2017-06-06 Thread Chad Versace
The new function takes a mesa_format and, if the format is an alpha format with a non-alpha variant, returns the non-alpha format. Otherwise, it returns the original format. Example: input -> output // Fallback exists MESA_FORMAT_R8G8B8X8_UNORM -> MESA_FORMAT_R8G8B8A8_UNORM

Re: [Mesa-dev] [PATCH 14/30] intel/isl: Add an enum for describing auxiliary compression state

2017-06-06 Thread Chad Versace
On Fri 26 May 2017, Jason Ekstrand wrote: > This enum describes all of the states that a auxiliary compressed > surface can have. All of the states as well as normative language for > referring to each of the compression operations is provided in the > truly colossal comment for the new

Re: [Mesa-dev] [PATCH] i965: Don't try to resolve CCS with MESA_FORMAT_NONE.

2017-06-06 Thread Chad Versace
On Sun 04 Jun 2017, Jason Ekstrand wrote: > On June 4, 2017 5:36:57 PM Kenneth Graunke wrote: > > > On Sunday, June 4, 2017 3:27:04 PM PDT Jason Ekstrand wrote: > > > How does the texture even have a format of MESA_FORMAT_NONE? That seems > > > like the first question to

Re: [Mesa-dev] [PATCH 13/30] i965: Combine render target resolve code

2017-06-06 Thread Chad Versace
e: if (irb->layer_count > 1 && intel_miptree_has_css_d_in_layer_range(brw, mt, irb->mt_level, irb->mt_layer, irb->layer_count)) Anway, this patch is a good cleanup, and functional changes like I'm requesting don't belong in a refacto

Re: [Mesa-dev] [PATCH 12/30] i965/blorp: Move MCS allocation earlier for clears

2017-06-06 Thread Chad Versace
Patches 10-12 are Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 08/30] i965: Inline renderbuffer_att_set_needs_depth_resolve

2017-06-06 Thread Chad Versace
On Fri 02 Jun 2017, Jason Ekstrand wrote: > On Fri, Jun 2, 2017 at 2:41 PM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > > I believe you could simplify this by eliminating the 'else' branch. As > long as depth_irb->layer_count == 1 for non-layered re

Re: [Mesa-dev] [PATCH 10/30] i965/blorp: Take an explicit fast clear op in resolve_color

2017-06-02 Thread Chad Versace
), 15 deletions(-) Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 09/30] i965/miptree: Move color resolve on map to intel_miptree_map

2017-06-02 Thread Chad Versace
viewed-by: Chad Versace <chadvers...@chromium.org> > This change also makes us only resolve > the one slice we're mapping and not the entire image. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 08/30] i965: Inline renderbuffer_att_set_needs_depth_resolve

2017-06-02 Thread Chad Versace
On Fri 26 May 2017, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_clear.c | 12 ++-- > src/mesa/drivers/dri/i965/brw_draw.c | 12 +++- > src/mesa/drivers/dri/i965/intel_fbo.c | 15 --- > src/mesa/drivers/dri/i965/intel_fbo.h | 3 --- > 4 files changed,

Re: [Mesa-dev] [PATCH 07/30] i965: Get rid of intel_renderbuffer_resolve_*

2017-06-02 Thread Chad Versace
cleaned up. Patch 7 is Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 06/30] i965/miptree: Refactor intel_miptree_resolve_color

2017-06-02 Thread Chad Versace
Maybe: > >          /* Mipmapped fast clear is only supported for gen8+. */ > > > +      assert(brw->gen >= 8 || map->level == 0); > > > Actually, I think I want "assert(brw->gen >= 8 || (map->level == 0 && map-> > layer == 0)

Re: [Mesa-dev] [PATCH 05/30] i965/miptree: Clean up the depth resolve helpers a little

2017-06-02 Thread Chad Versace
On Fri 26 May 2017, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 70 > --- > 1 file changed, 30 insertions(+), 40 deletions(-) Patch 5 is Reviewed-by: Chad Versace <chadvers.

Re: [Mesa-dev] [PATCH 04/30] i965/miptree: Store fast clear colors in an isl_color_value

2017-06-02 Thread Chad Versace
t; src/mesa/drivers/dri/i965/gen8_depth_state.c | 2 +- > src/mesa/drivers/dri/i965/intel_mipmap_tree.c| 31 - > src/mesa/drivers/dri/i965/intel_mipmap_tree.h| 34 ++---- > 14 files changed, 90 insertions(+), 136 deletions(-) Patch 4 is Reviewed-by: Cha

Re: [Mesa-dev] [PATCH 01/30] i965: Mark depth surfaces as needing a HiZ resolve after blitting

2017-06-02 Thread Chad Versace
On Fri 02 Jun 2017, Jason Ekstrand wrote: > On Fri, Jun 2, 2017 at 1:01 PM, Chad Versace <[1]chadvers...@chromium.org> > wrote: > > On Wed 31 May 2017, Pohjolainen, Topi wrote: > > On Wed, May 31, 2017 at 10:22:09AM -0700, Jason Ekstrand wrote: > > >

Re: [Mesa-dev] [PATCH 03/30] intel/isl: Add a helper for determining if a color is 0/1

2017-06-02 Thread Chad Versace
On Fri 26 May 2017, Jason Ekstrand wrote: > --- > src/intel/isl/isl.c | 19 +++ > src/intel/isl/isl.h | 4 > 2 files changed, 23 insertions(+) > > diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c > index 321850e..4eec2fd 100644 > --- a/src/intel/isl/isl.c > +++

Re: [Mesa-dev] [PATCH 02/30] i965/surface_state: Images can't handle CCS at all

2017-06-02 Thread Chad Versace
On Fri 26 May 2017, Jason Ekstrand wrote: > --- > src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) Patch 2 is Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ m

Re: [Mesa-dev] [PATCH 01/30] i965: Mark depth surfaces as needing a HiZ resolve after blitting

2017-06-02 Thread Chad Versace
On Wed 31 May 2017, Pohjolainen, Topi wrote: > On Wed, May 31, 2017 at 10:22:09AM -0700, Jason Ekstrand wrote: > > On Tue, May 30, 2017 at 7:29 AM, Pohjolainen, Topi < > > topi.pohjolai...@gmail.com> wrote: > > > > On Fri, May 26, 2017 at 04:30:05PM -0700, Jason Ekstrand wrote: > > > > > Cc:

[Mesa-dev] [PATCH] i965: Replace 0 with ISL_FORMAT_UNSUPPORTED in format table (v2)

2017-06-01 Thread Chad Versace
From: Chad Versace <chadvers...@chromium.org> When given an *unsupported* mesa_format, brw_isl_format_for_mesa_format() returned 0, a *valid* isl_format, ISL_FORMAT_R32G32B32A32_FLOAT. The problem is that brw_isl_format_for_mesa_format's inner table used 0 instead of ISL_FORMAT_UNSUP

Re: [Mesa-dev] [PATCH 4/6] i965: Replace 0 with ISL_FORMAT_UNSUPPORTED in format table

2017-06-01 Thread Chad Versace
On Wed 31 May 2017, Jason Ekstrand wrote: > On May 31, 2017 9:32:23 PM Ian Romanick wrote: > > > Having the unsupported format value not be zero isn't very safe. The > > C99 rules say that any field missing an initializer is implicitly > > initialized to zero. If a

Re: [Mesa-dev] [PATCH V2] i965: Rename brw_format variable names to isl_format

2017-06-01 Thread Chad Versace
ore. I don't think he saw yours. Right. I didn't see Anuj's patch. Anuj, your patch looks good to me, and it's Reviewed-by: Chad Versace <chadvers...@chromium.org> If your patch lands before mine, it's no trouble to rebase my patches. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [Mesa-stable] [PATCH 6/6] i965/dri: Fix bad GL error in intel_create_winsys_renderbuffer()

2017-06-01 Thread Chad Versace
On Wed 31 May 2017, Ian Romanick wrote: > On 05/31/2017 04:43 PM, Chad Versace wrote: > > This function never occurs in the callchain of a GL function. It occurs > > only in the callchain of eglCreate*Surface and the analogous paths for > > GLX. Therefore, even if a thread

[Mesa-dev] [PATCH] i965: Reject unsupported formats in glEGLImageTargetTexture2D()

2017-05-31 Thread Chad Versace
If the EGLImage's format is not a supported texture format according to brw_surface_formats.c, then refuse to create the miptree. This follows the precedent in glEGLImageRenderbufferStorage (implemented by intel_image_target_renderbuffer_storage), which rejects the EGLImage's format if is not

[Mesa-dev] [PATCH 0/6] i965: Little fixes & cleanups

2017-05-31 Thread Chad Versace
Test run totals: Passed:530/530 (100.0%) Failed:0/530 (0.0%) Not supported: 0/530 (0.0%) Warnings: 0/530 (0.0%) This patch series lives on the tag http://git.kiwitree.net/cgit/~chadv/mesa/tag/?h=chadv/review/2017-05-31/i965-cleanups-v01 Chad Vers

[Mesa-dev] [PATCH 6/6] i965/dri: Fix bad GL error in intel_create_winsys_renderbuffer()

2017-05-31 Thread Chad Versace
This function never occurs in the callchain of a GL function. It occurs only in the callchain of eglCreate*Surface and the analogous paths for GLX. Therefore, even if a thread does have a bound GL context, emitting a GL error here is wrong. A misplaced GL error, when no GL call is made, can

[Mesa-dev] [PATCH 2/6] i965: Fix return type of translate_tex_format()

2017-05-31 Thread Chad Versace
It returns an isl_format, not GLuint BRW_FORMAT. I updated every translate_tex_format() found by git-grep. No change in behavior. --- src/mesa/drivers/dri/i965/brw_state.h| 6 +++--- src/mesa/drivers/dri/i965/brw_surface_formats.c | 2 +-

[Mesa-dev] [PATCH 4/6] i965: Replace 0 with ISL_FORMAT_UNSUPPORTED in format table

2017-05-31 Thread Chad Versace
When given an *unsupported* mesa_format, brw_isl_format_for_mesa_format() returned 0, a *valid* isl_format, ISL_FORMAT_R32G32B32A32_FLOAT. The problem is that brw_isl_format_for_mesa_format's inner table used 0 instead of ISL_FORMAT_UNSUPPORTED to indicate unsupported mesa formats. Some callers

[Mesa-dev] [PATCH 3/6] i965: Remove bad assert on isl_format

2017-05-31 Thread Chad Versace
translate_tex_format() asserted that isl_format != 0. But 0 is a valid format, ISL_FORMAT_R32G32B32A32_FLOAT. --- src/mesa/drivers/dri/i965/brw_surface_formats.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c

[Mesa-dev] [PATCH 5/6] i965: Cleanup in intel_create_winsys_renderbuffer()

2017-05-31 Thread Chad Versace
Combine variable declarations and assignments. Trivial cleanup. --- src/mesa/drivers/dri/i965/intel_fbo.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index d3905a5..d69b921 100644 ---

[Mesa-dev] [PATCH 1/6] i965: Fix return type of brw_isl_format_for_mesa_format()

2017-05-31 Thread Chad Versace
It returns an isl_format, not uint32_t BRW_FORMAT. I updated every brw_isl_format_for_mesa_format() found by git-grep. No change in behavior. --- src/mesa/drivers/dri/i965/brw_context.c | 5 +++-- src/mesa/drivers/dri/i965/brw_state.h| 3 +--

[Mesa-dev] [PATCH 1/9] i965/dri: Rewrite comment for intelCreateBuffer

2017-05-26 Thread Chad Versace
The old comment pinned this function to X11 windows. In reality, this function serves more than X11 and more than just windows. --- src/mesa/drivers/dri/i965/intel_screen.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c

[Mesa-dev] [PATCH 6/9] i965: Add whitespace in intel_update_image_buffers()

2017-05-26 Thread Chad Versace
Improve readability. Add an empty line between two large 'if' blocks. --- src/mesa/drivers/dri/i965/brw_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 825912b7b5..3e3fe2d0ed 100644 ---

[Mesa-dev] [PATCH 9/9] i965: Fix type of brw_context::render_target_format[]

2017-05-26 Thread Chad Versace
It's an array of isl_format, not uint32_t. This patch updates every reference to render_target_format[] git-grep. Trivial cleanup. No change in behavior. --- src/mesa/drivers/dri/i965/brw_blorp.c| 4 ++-- src/mesa/drivers/dri/i965/brw_context.h | 2 +-

[Mesa-dev] [PATCH 0/9] i965: A few tiny trivial cleanups

2017-05-26 Thread Chad Versace
I was hacking on the i965/DRI glue, and on brw_surface_formats.c, and I found several little cleanups to make the code nicer. All these patches are super small. Chad Versace (9): i965/dri: Rewrite comment for intelCreateBuffer i965/dri: Combine declaration and assignment in intelCreateBuffer

[Mesa-dev] [PATCH 3/9] i965: Rename intel_create_renderbuffer

2017-05-26 Thread Chad Versace
The name is misleading because the function is unrelated to GL renderbuffers. Rename it to intel_create_winsys_renderbuffer. --- src/mesa/drivers/dri/i965/intel_fbo.c| 11 ++- src/mesa/drivers/dri/i965/intel_fbo.h| 2 +- src/mesa/drivers/dri/i965/intel_screen.c | 4 ++-- 3 files

[Mesa-dev] [PATCH 7/9] i965: Document type of GLuint __DRIimage::format

2017-05-26 Thread Chad Versace
It's either a mesa_format or mesa_array_format. --- src/mesa/drivers/dri/i965/intel_image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_image.h b/src/mesa/drivers/dri/i965/intel_image.h index ad426910e4..cf0610540f 100644 ---

[Mesa-dev] [PATCH 2/9] i965/dri: Combine declaration and assignment in intelCreateBuffer

2017-05-26 Thread Chad Versace
Trivial cleanup. --- src/mesa/drivers/dri/i965/intel_screen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 5de6f18b84..24123e7986 100644 ---

[Mesa-dev] [PATCH 8/9] i965: Move func to right comment block in brw_context.h

2017-05-26 Thread Chad Versace
brw_init_surface_formats() is defined in brw_surface_formats.c, not brw_wm_surface_state.c. --- src/mesa/drivers/dri/i965/brw_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index

[Mesa-dev] [PATCH 4/9] i965: Fix type of intel_update_image_buffers::format

2017-05-26 Thread Chad Versace
It's a mesa_format, not an unsigned int. --- src/mesa/drivers/dri/i965/brw_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index c815a0454d..adae921e57 100644 ---

[Mesa-dev] [PATCH 5/9] i965: Move an 'i' declaration into its 'for' loop

2017-05-26 Thread Chad Versace
In intel_update_dri2_buffers(). Trivial cleanup. --- src/mesa/drivers/dri/i965/brw_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index adae921e57..825912b7b5 100644 ---

[Mesa-dev] [PATCH 0/2] egl/android: A few trivial cleanups

2017-05-26 Thread Chad Versace
Chad Versace (2): egl/android: Align channel masks in HAL_PIXEL_FORMAT table egl/android: Drop unused 'format' param in get_back_bo() src/egl/drivers/dri2/platform_android.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.13.0

[Mesa-dev] [PATCH 2/2] egl/android: Drop unused 'format' param in get_back_bo()

2017-05-26 Thread Chad Versace
--- src/egl/drivers/dri2/platform_android.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index e76e1678a8..4fed751eae 100644 --- a/src/egl/drivers/dri2/platform_android.c +++

[Mesa-dev] [PATCH 1/2] egl/android: Align channel masks in HAL_PIXEL_FORMAT table

2017-05-26 Thread Chad Versace
Improves readability. No change in behavior. --- src/egl/drivers/dri2/platform_android.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index de24a8f5c4..e76e1678a8 100644 ---

Re: [Mesa-dev] [PATCH] st/dri: Add fence extension to SW path

2017-05-22 Thread Chad Versace
When you resubmit the patch again, please add (v3) to the subject. On Mon 08 May 2017, Gurchetan Singh wrote: > Use the same fence implementation for drisw.c as dri2.c by making > dri2FenceExtension an external variable. Since the fence implementation > is not dri2.c specific, put it in a

Re: [Mesa-dev] [Mesa-stable] [PATCH] egl: Partially revert 23c86c74, fix eglMakeCurrent

2017-05-18 Thread Chad Versace
On Thu 18 May 2017, Tapani Pälli wrote: > On 05/18/2017 12:16 AM, Tomasz Figa wrote: > > Hi, > > > > On Tue, May 16, 2017 at 11:35 PM, Tapani Pälli <tapani.pa...@intel.com> > > wrote: > > > > > > On 05/16/2017 08:10 PM, Chad Versace wr

Re: [Mesa-dev] [PATCH 2/7] egl/x11: check for dri2_dpy->flush before using the flush extension

2017-05-16 Thread Chad Versace
On Mon 15 May 2017, Emil Velikov wrote: > From: Emil Velikov > > Analogous to previous commit. > > Signed-off-by: Emil Velikov > --- > If people prefer I can split the whitespace/indent changes in > this/previous path from the rest.

Re: [Mesa-dev] [PATCH 1/7] egl/drm: check for dri2_dpy->flush before using the flush extension

2017-05-16 Thread Chad Versace
k for what we use. Patch 1 is Reviewed-by: Chad Versace <chadvers...@chromium.org> > > Signed-off-by: Emil Velikov <emil.veli...@collabora.com> > --- > src/egl/drivers/dri2/platform_drm.c | 41 > +++--

Re: [Mesa-dev] [PATCH] intel/isl/gen6: Fix combined depth stencil alignment

2017-05-16 Thread Chad Versace
- > 1 file changed, 7 insertions(+), 7 deletions(-) Thanks. Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] egl: Partially revert 23c86c74, fix eglMakeCurrent

2017-05-16 Thread Chad Versace
On Tue 16 May 2017, Tapani Pälli wrote: > > > On 05/16/2017 02:04 AM, Chad Versace wrote: > > Fixes regressions in Android CtsVerifier.apk on Intel Chrome OS devices > > due to incorrect error handling in eglMakeCurrent. See below on how to > > conf

[Mesa-dev] [PATCH] egl: Partially revert 23c86c74, fix eglMakeCurrent

2017-05-15 Thread Chad Versace
Fixes regressions in Android CtsVerifier.apk on Intel Chrome OS devices due to incorrect error handling in eglMakeCurrent. See below on how to confirm the regression is fixed. This partially reverts commit 23c86c74cc450a23848b85cfe914376caede1cdf Author: Chad Versace <chadv

Re: [Mesa-dev] [PATCH 3/4] intel/isl: Refactor gen6_choose_image_alignment_el

2017-05-15 Thread Chad Versace
On Sat 13 May 2017, Jason Ekstrand wrote: > On Fri, May 12, 2017 at 3:35 PM, Chad Versace <chadvers...@chromium.org> > wrote: > > > On Thu 11 May 2017, Jason Ekstrand wrote: > > > On Thu, May 11, 2017 at 9:08 PM, Chad Versace <chadvers...@chromium.org> >

Re: [Mesa-dev] [PATCH 3/4] intel/isl: Refactor gen6_choose_image_alignment_el

2017-05-12 Thread Chad Versace
On Thu 11 May 2017, Jason Ekstrand wrote: > On Thu, May 11, 2017 at 9:08 PM, Chad Versace <chadvers...@chromium.org> > wrote: > > > On Thu 11 May 2017, Jason Ekstrand wrote: > > > On Thu, May 11, 2017 at 7:03 AM, Pohjolainen, Topi < > > > topi.pohjolai

Re: [Mesa-dev] [PATCH 4/4] intel/isl: Refactor gen8_choose_image_alignment_el

2017-05-11 Thread Chad Versace
= isl_extent3d(16, 4, 1); return; } *image_align_el = isl_extent3d(4, 4, 1); } With or without that change, this patch is a good cleanup. Reviewed-by: Chad Versace <chadvers...@chromium.org> ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 3/4] intel/isl: Refactor gen6_choose_image_alignment_el

2017-05-11 Thread Chad Versace
On Thu 11 May 2017, Jason Ekstrand wrote: > On Thu, May 11, 2017 at 7:03 AM, Pohjolainen, Topi < > topi.pohjolai...@gmail.com> wrote: > > > On Wed, May 10, 2017 at 02:30:31PM -0700, Jason Ekstrand wrote: > > > --- > > > src/intel/isl/isl_gen6.c | 30 -- > > > 1 file

Re: [Mesa-dev] [PATCH 2/4] intel/isl: Refactor gen7_choose_image_alignment_el

2017-05-11 Thread Chad Versace
; - /* Prefer VALIGN_2 because it conserves memory. */ > > - return 2; > > -} > > - > > -void > > -isl_gen7_choose_image_alignment_el(const struct isl_device *dev, > > - const struct isl_surf_init_info > > *restrict in

Re: [Mesa-dev] [PATCH 1/4] intel/isl/gen7: Use stencil vertical alignment of 8 instead of 4

2017-05-11 Thread Chad Versace
; Signed-off-by: Topi Pohjolainen <topi.pohjolai...@intel.com> > Cc: "17.0 17.1" <mesa-sta...@lists.freedesktop.org> > Reviewed-by: Jason Ekstrand <ja...@jlekstrand.net> > - * FINISHME(chadv): Decide to set valign=4 or valign=8 after isl's API > -

Re: [Mesa-dev] i965: Use isl for hiz and stencil

2017-05-11 Thread Chad Versace
On Tue 09 May 2017, Jason Ekstrand wrote: > All of the below being said, I'm fine with landing things with a > BACK_TO_BACK layout and then making the switch to one isl_surf per miplevel > later if that's an easier path. I haven't read the series in full, but I agree with Jason here that an array

Re: [Mesa-dev] [RFC] intel/isl: Rewrite gen7_choose_image_alignment_el

2017-05-11 Thread Chad Versace
} do_more_stuff(); return ok_now; > But it's largely a matter of taste, so...*shrug*. Not always. The Go code guidelines strongly recommend the "early return" style for error handling. The guide provides a good explanation. <https://github.com/golang/go/wiki/CodeReviewComm

Re: [Mesa-dev] [PATCH 18/21] anv: Implement support for exporting semaphores as FENCE_FD

2017-05-11 Thread Chad Versace
On Tue 09 May 2017, Jason Ekstrand wrote: > On Tue, May 9, 2017 at 4:49 PM, Chad Versace <chadvers...@chromium.org> > wrote: > > > I learned a lot by reviewing this patch. Before reviewing it, some parts > > of the external_semaphore spec still confused me. But r

Re: [Mesa-dev] [PATCH 18/21] anv: Implement support for exporting semaphores as FENCE_FD

2017-05-09 Thread Chad Versace
I learned a lot by reviewing this patch. Before reviewing it, some parts of the external_semaphore spec still confused me. But reviewing this forced me to really learn the behavior of external semaphores. Other than some small security nits, the only real issue I found was the error behavior of

Re: [Mesa-dev] [PATCH] configure.ac: Also match -androideabi tuple

2017-05-05 Thread Chad Versace
"-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS > -D__STDC_LIMIT_MACROS" > AC_SUBST([DEFINES]) > android=no > case "$host_os" in > -*-android) > +*-android*) > android=yes > ;; > linux*|*-gnu*|gnu*|cygwin*) Reviewed-by: Chad Versace <chadvers...@ch

Re: [Mesa-dev] [PATCH 7/7] egl: use designated initializers

2017-05-05 Thread Chad Versace
I was going to write a similar patch series today, until I found yours :) Thanks for cleaning this up. By the way, I have some i965 Android logging fixups I need to send to the list. With the for-loop conditional fixed, the series is Reviewed-by: Chad Versace <chadvers...@chromium.

Re: [Mesa-dev] [PATCH] anv/allocator: Only write to _vg_ptr if we have valgrind

2017-05-05 Thread Chad Versace
On Fri 05 May 2017, Jason Ekstrand wrote: > This fixes the build when not building against valgrind headers. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100945 > --- > src/intel/vulkan/anv_allocator.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

<    1   2   3   4   5   6   7   8   9   10   >