Re: [Mesa-dev] [PATCH 2/2] drisw: Use separate drisw_loader_funcs for shm

2018-11-23 Thread Emil Velikov
Hi Michal, On 2018/11/23, Michal Srb wrote: > The original code was modifying the global drisw_lf variable, which is bad > when there are multiple contexts in single process, each initialized with > different loader. One may support put_image_shm and the other not. > > Since there are currently

[Mesa-dev] [PATCH 3/7] radv: add radv_image_view_can_fast_clear() helper

2018-11-23 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_meta_clear.c | 47 ++-- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index d9acd194ce5..9c124c9b677 100644 ---

[Mesa-dev] [PATCH 1/7] radv: remove useless check in emit_fast_color_clear()

2018-11-23 Thread Samuel Pitoiset
The driver doesn't support DCC/CMASK for mipmapped textures. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_meta_clear.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index f2f5cb32eb9..26bc5e75ef3 100644 ---

[Mesa-dev] [PATCH 6/7] radv: refactor the fast clear path for better re-use

2018-11-23 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_meta_clear.c | 78 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index 37b743e994a..d4da614584b 100644 ---

[Mesa-dev] [PATCH 2/7] radv: add radv_image_can_fast_clear() helper

2018-11-23 Thread Samuel Pitoiset
Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_meta_clear.c | 68 ++-- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index 26bc5e75ef3..d9acd194ce5 100644 ---

[Mesa-dev] [PATCH 5/7] radv: simplify a check in emit_fast_color_clear()

2018-11-23 Thread Samuel Pitoiset
Currently only true if RADV_PERFTEST=dccmsaa is set. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_meta_clear.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index 6c8ef4958f2..37b743e994a

[Mesa-dev] [PATCH 4/7] radv: add radv_can_fast_clear_{color, depth}() helpers

2018-11-23 Thread Samuel Pitoiset
For further optimisations. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_meta_clear.c | 133 +-- 1 file changed, 89 insertions(+), 44 deletions(-) diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index

[Mesa-dev] [PATCH 7/7] radv: optimize CmdClear{Color, DepthStencil}Image() for layered textures

2018-11-23 Thread Samuel Pitoiset
If all layers are bound we can perform a fast color or depth clear instead of iterating over all layers. This has the advantage to avoid trashing the framebuffer for nothing if you we end up by doing a fast clear when calling radv_clear_image_layer(), and clearing all layers in one shot is

Re: [Mesa-dev] [PATCH 2/2] glsl: free or reuse memory allocated for TF varying

2018-11-23 Thread Tapani Pälli
Hi; On 11/23/18 10:29 AM, Gert Wollny wrote: Hello Tapani, since you wrote the original code, could you have a look at this patch? Sure. I was able to reproduce this leak with Piglit's "ext_transform_feedback-points" and fix LGTM; Reviewed-by: Tapani Pälli Many thanks, Gert Am

Re: [Mesa-dev] [PATCH mesa 00/13] Make standard function available on non-standard platforms

2018-11-23 Thread Jose Fonseca
On 21/11/2018 21:17, Ian Romanick wrote: On 11/21/2018 12:16 PM, Jose Fonseca wrote:    util: use standard name for strncat()    util: use standard name for strncmp()    util: use standard name for strcmp()    util: use standard name for strchr()    util: use standard name for sprintf()

Re: [Mesa-dev] [PATCH 2/2] radv: correctly use vulkan 1.0 by default

2018-11-23 Thread Eric Engestrom
On Friday, 2018-11-23 00:32:29 +0100, Niklas Haas wrote: > From the vulkan spec 3.2 "Instances": > > "Providing a NULL VkInstanceCreateInfo::pApplicationInfo or providing an > apiVersion of 0 is equivalent to providing an apiVersion of > VK_MAKE_VERSION(1,0,0)." > --- >

[Mesa-dev] [Bug 108848] 3d image broken in Dragon age: origins

2018-11-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=108848 ilia changed: What|Removed |Added Attachment #142590|0 |1 is obsolete|

Re: [Mesa-dev] [Mesa-announce] [ANNOUNCE] mesa 18.3.0-rc4

2018-11-23 Thread Emil Velikov
On 2018/11/22, Marek Olšák wrote: > Also this one is probably a blocker: > https://patchwork.freedesktop.org/patch/262760/ > > Without it, the computer may run out of memory depending on the window > system. > Thanks Marek. Added to the list, will keep a close eye on it. -Emil

[Mesa-dev] [PATCH v2 2/2] drisw: Use separate drisw_loader_funcs for shm

2018-11-23 Thread Michal Srb
The original code was modifying the global drisw_lf variable, which is bad when there are multiple contexts in single process, each initialized with different loader. One may support put_image_shm and the other not. Since there are currently only two possible combinations, lets create two global

[Mesa-dev] [PATCH] egl/wayland: bail out when drmGetMagic fails

2018-11-23 Thread Emil Velikov
From: Emil Velikov Currently as the function fails, we pass uninitialized data to the authentication function. Stop doing that and print an warning when the function fails. Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Emil Velikov --- src/egl/drivers/dri2/platform_wayland.c | 5 -

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/2] anv: Put robust buffer access in the pipeline hash

2018-11-23 Thread Juan A. Suarez Romero
On Wed, 2018-11-21 at 17:20 -0600, Jason Ekstrand wrote: > It affects apply_pipeline_layout. Shaders compiled with the wrong value > will work but they may not be robust as requested by the app. > > Cc: mesa-sta...@lists.freedesktop.org Hi, Jason. This patch does not apply cleanly in 18.2

Re: [Mesa-dev] [PATCH] egl/wayland: bail out when drmGetMagic fails

2018-11-23 Thread Tapani Pälli
Similar warning is done in platform_x11.c; Reviewed-by: Tapani Pälli On 11/23/18 2:59 PM, Emil Velikov wrote: From: Emil Velikov Currently as the function fails, we pass uninitialized data to the authentication function. Stop doing that and print an warning when the function fails. Cc:

Re: [Mesa-dev] [PATCH 06/18] mapi/new: use the static_data offsets in the new generator

2018-11-23 Thread Emil Velikov
On 2018/11/21, Dylan Baker wrote: > Quoting Emil Velikov (2018-11-21 04:04:03) > > > > +import os > > +GLAPI = os.path.join(os.path.dirname(sys.argv[0]), "..", "glapi/gen") > > you should use __file__ instead of sys.argv[0], also don't hardcode '/' into > there, join 'glapi' and 'gen' for

Re: [Mesa-dev] [PATCH 12/18] meson: wire the new generator for es1 and es2

2018-11-23 Thread Emil Velikov
On 2018/11/21, Dylan Baker wrote: > > diff --git a/src/mapi/glapi/gen/meson.build b/src/mapi/glapi/gen/meson.build > > index f494e9707b6..fa06c7c5458 100644 > > --- a/src/mapi/glapi/gen/meson.build > > +++ b/src/mapi/glapi/gen/meson.build > > @@ -18,6 +18,13 @@ > > # OUT OF OR IN CONNECTION WITH

Re: [Mesa-dev] [PATCH 12/18] meson: wire the new generator for es1 and es2

2018-11-23 Thread Emil Velikov
On 2018/11/23, Emil Velikov wrote: > On 2018/11/21, Dylan Baker wrote: > > > > diff --git a/src/mapi/glapi/gen/meson.build > > > b/src/mapi/glapi/gen/meson.build > > > index f494e9707b6..fa06c7c5458 100644 > > > --- a/src/mapi/glapi/gen/meson.build > > > +++ b/src/mapi/glapi/gen/meson.build > >

[Mesa-dev] [PATCH 1/2] gallium: Constify drisw_loader_funcs struct

2018-11-23 Thread Michal Srb
The content is not expected to change. Signed-off-by: Michal Srb --- src/gallium/auxiliary/pipe-loader/pipe_loader.h| 2 +- src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c | 2 +- src/gallium/winsys/sw/dri/dri_sw_winsys.c | 4 ++-- src/gallium/winsys/sw/dri/dri_sw_winsys.h

[Mesa-dev] [PATCH 2/2] drisw: Use separate drisw_loader_funcs for shm

2018-11-23 Thread Michal Srb
The original code was modifying the global drisw_lf variable, which is bad when there are multiple contexts in single process, each initialized with different loader. One may support put_image_shm and the other not. Since there are currently only two possible combinations, lets create two global

Re: [Mesa-dev] [PATCH 3/6] mesa/st: Factor out array and buffer setup from st_atom_array.c.

2018-11-23 Thread Chris Wilson
Quoting mathias.froehl...@gmx.net (2018-11-23 08:07:29) > From: Mathias Fröhlich > > Factor out vertex array setup routines from the array state atom. > The factored functions will be used in feedback rendering in the > next change. > > Signed-off-by: Mathias Fröhlich > --- >

Re: [Mesa-dev] [PATCH 6/6] mesa/main: fix incorrect detph-error

2018-11-23 Thread Juan A. Suarez Romero
On Thu, 2018-11-22 at 17:48 +0100, Erik Faye-Lund wrote: Typo in the subject (s/detph/depth) > If glGetTexImage or glGetnTexImage is called with a level that doesn't > exist, we get an error message on this form: > > Mesa: User error: GL_INVALID_VALUE in glGetTexImage(depth = 0) > > This is

Re: [Mesa-dev] [PATCH 0/6] glGetTexImage fixes

2018-11-23 Thread Juan A. Suarez Romero
On Thu, 2018-11-22 at 17:48 +0100, Erik Faye-Lund wrote: > I was recently investigating a gl-error that appears some times while > using virgl, where I got a pretty nonsensical GL-error: > > Mesa: User error: GL_INVALID_VALUE in glGetnTexImageARB(depth = 0) > > Now, the reason why this is

[Mesa-dev] [Bug 108530] [Tracker] Mesa 18.3 Release Tracker

2018-11-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=108530 --- Comment #1 from Emil Velikov --- As requested by Marek on the ML [1] we'd want this [2] memory leak fix. [1] https://lists.freedesktop.org/archives/mesa-dev/2018-November/210206.html [2] https://patchwork.freedesktop.org/patch/262760/ --

Re: [Mesa-dev] [PATCH] draw: fix infinite loop in line stippling

2018-11-23 Thread Jose Fonseca
On 23/11/2018 01:34, srol...@vmware.com wrote: From: Roland Scheidegger The calculated length of a line may be infinite, if the coords we get are bogus. This leads to an infinite loop in line stippling. To prevent this test for this explicitly (although technically on at least x86 sse it would

Re: [Mesa-dev] [PATCH 0/6] glGetTexImage fixes

2018-11-23 Thread Erik Faye-Lund
On Fri, 2018-11-23 at 15:50 +0100, Juan A. Suarez Romero wrote: > On Thu, 2018-11-22 at 17:48 +0100, Erik Faye-Lund wrote: > > I was recently investigating a gl-error that appears some times > > while > > using virgl, where I got a pretty nonsensical GL-error: > > > > Mesa: User error:

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/2] anv: Put robust buffer access in the pipeline hash

2018-11-23 Thread Jason Ekstrand
Looks good On Fri, Nov 23, 2018 at 8:29 AM Juan A. Suarez Romero wrote: > On Wed, 2018-11-21 at 17:20 -0600, Jason Ekstrand wrote: > > It affects apply_pipeline_layout. Shaders compiled with the wrong value > > will work but they may not be robust as requested by the app. > > > > Cc:

Re: [Mesa-dev] [PATCH 2/2] drisw: Use separate drisw_loader_funcs for shm

2018-11-23 Thread Michal Srb
On pátek 23. listopadu 2018 16:41:33 CET Emil Velikov wrote: > Hi Michal, > > On 2018/11/23, Michal Srb wrote: > > The original code was modifying the global drisw_lf variable, which is bad > > when there are multiple contexts in single process, each initialized with > > different loader. One may

[Mesa-dev] [PATCH] radv: only allocate HTILE if depth/stencil attachment usage is used

2018-11-23 Thread Samuel Pitoiset
Apparently some games allocate depth buffers without rendering to them, this will avoid wasting memory if that image usage flag is not set. Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH 3/6] mesa/st: Factor out array and buffer setup from st_atom_array.c.

2018-11-23 Thread Mathias Fröhlich
Hi Chris, On Friday, 23 November 2018 16:12:38 CET Chris Wilson wrote: > > Something to note here is that valgrind reports > (piglit/bin/drawoverhead): > > ==492== Use of uninitialised value of size 8 > ==492==at 0x6EB8FA9: cso_hash_find_node (cso_hash.c:198) > ==492==by 0x6EB9026:

[Mesa-dev] [Bug 108848] 3d image broken in Dragon age: origins

2018-11-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=108848 --- Comment #1 from ilia --- Created attachment 142587 --> https://bugs.freedesktop.org/attachment.cgi?id=142587=edit Log with nine enabled Game running with GALLIUM_HUD="fps,requested-VRAM" LIBGL_DEBUG=verbose GALLIUM_PRINT_OPTIONS=all

[Mesa-dev] [PATCH 1/2] radv: add device->instance extension dependencies

2018-11-23 Thread Niklas Haas
From the vulkan spec 33.3 "Extension Dependencies": "Any device extension that has an instance extension dependency that is not enabled by vkCreateInstance is considered to be unsupported, hence it must not be returned by vkEnumerateDeviceExtensionProperties for any VkPhysicalDevice child of the

[Mesa-dev] [PATCH 2/2] radv: correctly use vulkan 1.0 by default

2018-11-23 Thread Niklas Haas
From the vulkan spec 3.2 "Instances": "Providing a NULL VkInstanceCreateInfo::pApplicationInfo or providing an apiVersion of 0 is equivalent to providing an apiVersion of VK_MAKE_VERSION(1,0,0)." --- src/amd/vulkan/radv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Mesa-dev] [Bug 108848] 3d image broken in Dragon age: origins

2018-11-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=108848 --- Comment #2 from ilia --- Created attachment 142588 --> https://bugs.freedesktop.org/attachment.cgi?id=142588=edit Log with nine disabled Same env variables as with nine enabled. -- You are receiving this mail because: You are the

[Mesa-dev] [PATCH v2 07/29] mesa/main: use _mesa_has_FOO_bar for compressed format checks

2018-11-23 Thread Erik Faye-Lund
_mesa_has_FOO_bar() knows about the APIs these extensions should be supported under, so let's use that to simplify these checks a bit. Signed-off-by: Erik Faye-Lund --- src/mesa/main/glformats.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 2/2] glsl: free or reuse memory allocated for TF varying

2018-11-23 Thread Gert Wollny
Hello Tapani, since you wrote the original code, could you have a look at this patch? Many thanks, Gert Am Freitag, den 16.11.2018, 19:12 +0100 schrieb Gert Wollny: > From: Gert Wollny > > When a shader program is de-serialized the gl_shader_program passed > in > may actually still hold

Re: [Mesa-dev] [PATCH v2 00/13] query validation fixes

2018-11-23 Thread Erik Faye-Lund
On Fri, 2018-11-23 at 07:45 +0200, Tapani Pälli wrote: > Ping, this series has not landed yet, planning to land it soon? > Sorry for the delay, pushed now! > On 11/9/18 7:58 AM, Tapani Pälli wrote: > > Thanks, _mesa_has makes things a lot cleaner and simpler to manage; > > > > Reviewed-by:

Re: [Mesa-dev] [PATCH 2/2] radv: ignore subpass self-dependencies for CreateRenderPass() too

2018-11-23 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen for both. On Fri, Nov 23, 2018 at 9:45 AM Samuel Pitoiset wrote: > > We really need to refactor this... > > Signed-off-by: Samuel Pitoiset > --- > src/amd/vulkan/radv_pass.c | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git

[Mesa-dev] [Bug 108848] 3d image broken in Dragon age: origins

2018-11-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=108848 Bug ID: 108848 Summary: 3d image broken in Dragon age: origins Product: Mesa Version: 18.2 Hardware: Other OS: All Status: NEW Severity: normal

Re: [Mesa-dev] [PATCH 29/30] mesa/main: do not require float-texture filtering for es3

2018-11-23 Thread Erik Faye-Lund
On Thu, 2018-11-22 at 13:26 +0100, Mathias Fröhlich wrote: > Hi Erik, > > The series looks very reasonable and I could not spot loosing any > negating ! in the > query logic. Even if I have not been able time wise to double checked > every move when > which texture format got introduced in which

[Mesa-dev] [PATCH 2/6] mesa/st: Only unmap the uploader that was actually used.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich In st_atom_array, we only need to unmap the upload buffer that was actually used. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom_array.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_array.c

[Mesa-dev] [PATCH 5/6] mesa/st: Use binding information from the VAO in feedback rendering.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Use VAO binding information in feedback rendering. In theory it should reduce the amount of buffer objects scheduled for rendering. Feedback rendering is implemented in a crude way anyhow, so I do not expect much gain here. But for the sake of code reuse we should use the

[Mesa-dev] [PATCH 3/6] mesa/st: Factor out array and buffer setup from st_atom_array.c.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Factor out vertex array setup routines from the array state atom. The factored functions will be used in feedback rendering in the next change. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom.h | 17 ++ src/mesa/state_tracker/st_atom_array.c

[Mesa-dev] [PATCH 4/6] mesa/st: Avoid extra references in the feedback draw function scope.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich The change removes the reference that is held on the entries of the vbuffers[] array. The new code does not do that anymore as following the code into draw_set_vertex_buffers() the draw context holds an other reference as long as it is reset down the function again. So it

[Mesa-dev] [PATCH 1/6] mesa/st: Only care about the uploader if it was used.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich In st_atom_array, we only need to care for unmapping the upload buffer if we actually used it. Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom_array.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[Mesa-dev] [PATCH 6/6] mesa/st: Make st_pipe_vertex_format static.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Signed-off-by: Mathias Fröhlich --- src/mesa/state_tracker/st_atom.h | 3 --- src/mesa/state_tracker/st_atom_array.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_atom.h b/src/mesa/state_tracker/st_atom.h index

[Mesa-dev] [PATCH 0/6] Use common code for gallium array setup.

2018-11-23 Thread Mathias . Froehlich
From: Mathias Fröhlich Hi, The series unifies functions for array setup into gallium. Instead of just walking all VAO attributes we can make use of the enabled and required attribute arrays also for feedback rendering. Along that way cleanup duplicate references and unneeded calls to the

Re: [Mesa-dev] [PATCH] meson: Bump version to 0.46 for python module

2018-11-23 Thread Eero Tamminen
Hi, On 21.11.2018 20.13, Dylan Baker wrote: From: Arfrever Frehtes Taifersar Arahesis Meson has two modules for finding python, the python3 module and the python module. Python3 is older, and has some corner cases, python is newer, has no known corner cases and can detect python2. Things have

[Mesa-dev] [Bug 108848] 3d image broken in Dragon age: origins

2018-11-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=108848 --- Comment #3 from ilia --- Created attachment 142590 --> https://bugs.freedesktop.org/attachment.cgi?id=142590=edit Wine backtrace of game segfault In doubt is this relevant, but game also segfaults with this backtrace when pressing "New

[Mesa-dev] [PATCH 2/2] radv: ignore subpass self-dependencies for CreateRenderPass() too

2018-11-23 Thread Samuel Pitoiset
We really need to refactor this... Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_pass.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c index f8e5ea40954..b41ae89deec 100644 --- a/src/amd/vulkan/radv_pass.c +++

[Mesa-dev] [PATCH 1/2] radv: remove useless before CmdClear{Color, DepthStencil}Image()

2018-11-23 Thread Samuel Pitoiset
We don't need to flush anything before these two commands as well. This is because they have to be externally synchronized, so the app should have called CmdPipelineBarrier() prior to that and the driver should have flushed the caches. Signed-off-by: Samuel Pitoiset ---

[Mesa-dev] [PATCH v2 18/29] mesa/main: do not allow EXT_texture_shared_exponent enums before gles3

2018-11-23 Thread Erik Faye-Lund
ctx->Extensions.EXT_texture_shared_exponent is set regardless of the API that's used, so checking for those direcly will always allow the enums from this extensions when they are supported by the driver. We also need to make sure this is enabled on OpenGL ES 3. Because the check is repeated,

[Mesa-dev] [PATCH v2 20/29] mesa/main: do not allow type_2_10_10_10_REV enums before gles3

2018-11-23 Thread Erik Faye-Lund
ctx->Extensions.EXT_texture_type_2_10_10_10_REV is set regardless of the API that's used, so checking for those direcly will always enable extensions when they are supported by the driver. There's no corresponding extension for OpenGL ES 1.x/2.0, so we shouldn't allow these enums there.

[Mesa-dev] [PATCH v2 21/29] mesa/main: do not allow floating-point texture enums on gles1

2018-11-23 Thread Erik Faye-Lund
ctx->Extensions.OES_texture_float is set regardless of the API that's used, so checking for those direcly will always allow the enums from this extensions when they are supported by the driver. There's no extension enabling floating-point textures for OpenGL ES 1.x, so we shouldn't allow those

[Mesa-dev] [PATCH v2 14/29] mesa/main: do not allow integer-texture enums before gles3

2018-11-23 Thread Erik Faye-Lund
Integer textures shouldn't be implicitly exposed on OpenGL ES 1.x and 2.x, but because the code checked against a driver-capability rather than using an extension-check helper, we ended up accidentally allowing these enums on older versions when the driver supports it. Signed-off-by: Erik

[Mesa-dev] [PATCH v2 10/29] mesa/main: do not allow astc enums on gles1

2018-11-23 Thread Erik Faye-Lund
ctx->Extensions.KHR_texture_compression_astc_ldr is set regardless of the API that's used, so checking for those direcly will always enable extensions when they are supported by the driver. But there's no extension enabling ASTC for OpenGL ES 1.x, so we shouldn't allow those enums there.

[Mesa-dev] [PATCH v2 27/29] mesa/main: require EXT_texture_sRGB for gles3

2018-11-23 Thread Erik Faye-Lund
sRGB textures is a requirement for OpenGL ES 3.0, so let's make sure we don't incorrectly enable a too high version. Signed-off-by: Erik Faye-Lund --- src/mesa/main/version.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c index

[Mesa-dev] [PATCH v2 23/29] mesa/main: do not allow sRGB texture enums before gles3

2018-11-23 Thread Erik Faye-Lund
ctx->Extensions.EXT_texture_sRGB is set regardless of the API that's used, so checking for those direcly will always allow the enums from this extensions when they are supported by the driver. There's no extension adding support for this on OpenGL ES before version 3.0, so let's tighten the

[Mesa-dev] [PATCH v2 19/29] mesa/main: do not allow MESA_ycbcr_texture enums on gles

2018-11-23 Thread Erik Faye-Lund
This extension requies OpenGL, and shouldn't be available on OpenGL ES. So let's not allow the enums from it either. Signed-off-by: Erik Faye-Lund --- src/mesa/main/glformats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/glformats.c

[Mesa-dev] [PATCH v2 26/29] mesa/main: require EXT_texture_type_2_10_10_10_REV for gles3

2018-11-23 Thread Erik Faye-Lund
OpenGL ES 3.0 require this functionality, so we should also test for it to avoid incorrectly exposing a too high GLES version. On desktop, this has been required since all the way back in OpenGL 1.2 anyway. Signed-off-by: Erik Faye-Lund --- src/mesa/main/version.c | 3 ++- 1 file changed, 2

[Mesa-dev] [PATCH v2 15/29] mesa/main: do not allow ARB_depth_buffer_float enums before gles3

2018-11-23 Thread Erik Faye-Lund
Floating-point depth buffers are only supported on OpenGL 3.0, OpenGL ES 3.0, or if ARB_depth_buffer_float is supported. Because we checked a driver capability rather than using an extension-check helper, we ended up incorrectly allowing this on OpenGL ES 1.x and 2.x. Since this logic is

[Mesa-dev] [PATCH v2 25/29] mesa/main: split float-texture support checking in two

2018-11-23 Thread Erik Faye-Lund
On OpenGL ES 2.0, there's separate extensions adding support for half-float and float textures. So we need to validate the enums separately as well. This also prevents these enums from incorrectly being allowed on OpenGL ES 1.x, where there's no extension that enables this in the first place.

[Mesa-dev] [PATCH v2 16/29] mesa/main: do not allow EXT_packed_float enums before gles3

2018-11-23 Thread Erik Faye-Lund
EXT_packed_float isn't supported on OpenGL ES, we shouldn't allow these enums there, before OpenGL ES 3.0 which also introduce support for these enums. Signed-off-by: Erik Faye-Lund --- src/mesa/main/context.h | 6 ++ src/mesa/main/glformats.c | 6 +++--- 2 files changed, 9 insertions(+),

[Mesa-dev] [PATCH v2 13/29] mesa/main: do not allow ARB_texture_rgb10_a2ui enums before gles3

2018-11-23 Thread Erik Faye-Lund
ARB_texture_rgb10_a2ui isn't supported on OpenGL ES, we shouldn't expose it there even if the driver supports it. Signed-off-by: Erik Faye-Lund --- src/mesa/main/context.h | 6 ++ src/mesa/main/glformats.c | 12 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git

[Mesa-dev] [PATCH v2 05/29] mesa/main: clean up ES2_compatibility check

2018-11-23 Thread Erik Faye-Lund
This makes the logic a little bit easier to follow; this is *either* about ES2 compatibility *or* about gles. GL_RGB565 was added already in OpenGL ES 1.0. Signed-off-by: Erik Faye-Lund --- src/mesa/main/glformats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH v2 01/29] mesa/main: make _mesa_has_tessellation return bool

2018-11-23 Thread Erik Faye-Lund
All other _mesa_has_foo functions return bool rather than GLboolean, so let's follow that style here as well. Signed-off-by: Erik Faye-Lund --- src/mesa/main/context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index

[Mesa-dev] [PATCH v2 03/29] mesa/main: clean up S3_s3tc check

2018-11-23 Thread Erik Faye-Lund
S3_s3tc is the extension that enables this functionality on desktop, so let's check for that one. The _mesa_has_S3_s3tc() helper already verifies the API according to the extension-table. Signed-off-by: Erik Faye-Lund --- src/mesa/main/glformats.c | 8 +++- 1 file changed, 3 insertions(+),

[Mesa-dev] [PATCH v2 12/29] mesa/main: do not allow stencil-texture enums on gles1

2018-11-23 Thread Erik Faye-Lund
ctx->Extensions.ARB_texture_stencil8 is set regardless of the API that's used, so checking for those direcly will always allow the enums from this extensions when they are supported by the driver. So let's instead check for both ARB_texture_stencil8 and OES_texture_stencil8, so we support depth

[Mesa-dev] [PATCH v2 08/29] mesa/main: do not allow s3tc enums on gles1

2018-11-23 Thread Erik Faye-Lund
There's no extension enabling S3TC formats on OpenGL ES 1.x, so we shouldn't allow these even if the driver can support it. So let's check for EXT_texture_compression_s3tc instead of ANGLE_texture_compression_dxt, which is supported on all other OpenGL variations. We also need to use

[Mesa-dev] [PATCH v2 04/29] mesa/main: clean up OES_texture_float_linear check

2018-11-23 Thread Erik Faye-Lund
Using the _mesa_has_FOO_bar helpers is generally more safe and should generally be prefered over checking driver-caps like this code did, because the _mesa_has_FOO_bar helpers also verify the API type and version. This shouldn't have any practical effect here, as this function only gets called

[Mesa-dev] [PATCH v2 09/29] mesa/main: do not allow etc2 enums on gles1

2018-11-23 Thread Erik Faye-Lund
ctx->Extensions.ARB_ES3_compatibility is set regardless of the API that's used, so checking for those direcly will always enable extensions when they are supported by the driver. But there's no extension enabling ETC2 for OpenGL ES 1.x, so we shouldn't allow those enums there. Signed-off-by:

[Mesa-dev] [PATCH v2 17/29] mesa/main: do not allow rg-textures enums before gles3

2018-11-23 Thread Erik Faye-Lund
EXT_packed_float isn't supported on OpenGL ES, we shouldn't allow these enums there, before OpenGL ES 3.0 which also introduce support for these enums. Since this check is repeated a lot, let's make a helper for this. Signed-off-by: Erik Faye-Lund --- src/mesa/main/context.h | 6 ++

[Mesa-dev] [PATCH v2 22/29] mesa/main: do not allow snorm-texture enums before gles3

2018-11-23 Thread Erik Faye-Lund
ctx->Extensions.EXT_texture_snorm is set regardless of the API that's used, so checking for those direcly will always allow the enums from this extensions when they are supported by the driver. There's no extension adding support for this on OpenGL ES before version 3.0, so let's tighten the

[Mesa-dev] [PATCH v2 06/29] mesa/main: clean up integer texture check

2018-11-23 Thread Erik Faye-Lund
This makes the logic a little bit easier to follow, and reduce a bit of repetition. Signed-off-by: Erik Faye-Lund --- src/mesa/main/context.h | 6 ++ src/mesa/main/glformats.c | 27 +++ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git

[Mesa-dev] [PATCH v2 11/29] mesa/main: do not allow depth-texture enums on gles1

2018-11-23 Thread Erik Faye-Lund
ctx->Extensions.ARB_depth_texture is set regardless of the API that's used, so checking for those direcly will always allow the enums from this extensions when they are supported by the driver. So let's instead check for both ARB_depth_texture and OES_depth_texture, so we support depth textures

[Mesa-dev] [PATCH v2 24/29] mesa/main: do not allow EXT_texture_sRGB_R8 enums before gles3

2018-11-23 Thread Erik Faye-Lund
ctx->Extensions.EXT_texture_sRGB_R8 is set regardless of the API that's used, so checking for those direcly will always allow the enums from this extensions when they are supported by the driver. There's no extension adding support for this on OpenGL ES before version 3.0, so let's tighten the

[Mesa-dev] [PATCH v2 28/29] mesa/st: do not probe for the same texture-formats twice

2018-11-23 Thread Erik Faye-Lund
This should be equalent of what we did before. Signed-off-by: Erik Faye-Lund --- src/mesa/state_tracker/st_extensions.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index

[Mesa-dev] [PATCH v2 29/29] mesa/main: do not require float-texture filtering for es3

2018-11-23 Thread Erik Faye-Lund
The OpenGL ES 3.0 specification, table 3.13 lists half-float textures as filterable, but not float textures. So we shouldn't depend on ARB_float_texture, which requires full filtering support for both. Signed-off-by: Erik Faye-Lund --- src/mesa/main/version.c | 4 +++- 1 file changed, 3

[Mesa-dev] [PATCH v2 00/29] do not allow invalid texture-format enums

2018-11-23 Thread Erik Faye-Lund
OK, so here's a v2 of this series. These are the changes since v1: - Removed double-semicolons in patch #25 - Removed default-case and questionable comment in patch #25 - Dropped patch #30, as it would regress functionality on two drivers Please review :) Erik Faye-Lund (29): mesa/main: make

[Mesa-dev] [PATCH v2 02/29] mesa/main: rename format-check function

2018-11-23 Thread Erik Faye-Lund
_mesa_es3_error_check_format_and_type isn't specific to OpenGL ES 3.x, it applies to all versions of OpenGL ES. So let's rename it to reflect this. While we're at it, let's also rename a helper function it uses similarly. As the helper is static, we can also remove the namespacing-prefix from the

Re: [Mesa-dev] [PATCH 3/6] mesa/st: Factor out array and buffer setup from st_atom_array.c.

2018-11-23 Thread Mathias Fröhlich
Hi, On Friday, 23 November 2018 18:38:26 CET Chris Wilson wrote: > > I tried to reproduce this, but valgrind does not show any failures with > > drawoverhead > > on radeonsi. > > What driver backend do you use? > > iris, but we don't hit backends before the error on this path. I know, I

Re: [Mesa-dev] [PATCH 1/2] winsys/amdgpu: add amdgpu_winsys_bo::lock

2018-11-23 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Wed, Nov 21, 2018 at 12:57 PM Nicolai Hähnle wrote: > From: Nicolai Hähnle > > We'll use it in the upcoming mapping change. Sparse buffers have always > had one. > --- > src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 19 +-- >

Re: [Mesa-dev] [PATCH] egl/wayland: bail out when drmGetMagic fails

2018-11-23 Thread Eric Engestrom
On Friday, 2018-11-23 12:59:52 +, Emil Velikov wrote: > From: Emil Velikov > > Currently as the function fails, we pass uninitialized data to the > authentication function. Stop doing that and print an warning when > the function fails. > > Cc: mesa-sta...@lists.freedesktop.org >

Re: [Mesa-dev] [PATCH] meson: Bump version to 0.46 for python module

2018-11-23 Thread Dylan Baker
Hi Eero, I'm not sure how to avoid build breakages, as currently using the python3 module is broken if the python3 file/link is < 3.5, however, trying to do a simple `find_program('python3')` will not work on Windows or OSX. I guess we could do an if `meson_version < 0.46` thing. Dylan Quoting

Re: [Mesa-dev] [PATCH 06/18] mapi/new: use the static_data offsets in the new generator

2018-11-23 Thread Dylan Baker
Quoting Emil Velikov (2018-11-23 05:35:31) > On 2018/11/21, Dylan Baker wrote: > > Quoting Emil Velikov (2018-11-21 04:04:03) > > > > > > > +import os > > > +GLAPI = os.path.join(os.path.dirname(sys.argv[0]), "..", "glapi/gen") > > > > you should use __file__ instead of sys.argv[0], also don't

Re: [Mesa-dev] [RFC 12/13] fixup! wip

2018-11-23 Thread Jason Ekstrand
That is the lamest commit message I think I've ever seen. On Fri, Nov 23, 2018 at 4:29 PM Dylan Baker wrote: > --- > src/mapi/glapi/gen/khr_xml.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mapi/glapi/gen/khr_xml.py b/src/mapi/glapi/gen/khr_xml.py > index

Re: [Mesa-dev] [PATCH 3/6] mesa/st: Factor out array and buffer setup from st_atom_array.c.

2018-11-23 Thread Chris Wilson
Quoting Mathias Fröhlich (2018-11-23 17:14:45) > Hi Chris, > > On Friday, 23 November 2018 16:12:38 CET Chris Wilson wrote: > > > > Something to note here is that valgrind reports > > (piglit/bin/drawoverhead): > > > > ==492== Use of uninitialised value of size 8 > > ==492==at 0x6EB8FA9:

Re: [Mesa-dev] [PATCH 1/2] winsys/amdgpu: fix a buffer leak in amdgpu_bo_from_handle

2018-11-23 Thread Marek Olšák
Ping On Mon, Nov 19, 2018 at 6:24 PM Marek Olšák wrote: > From: Marek Olšák > > Cc: 18.2 18.3 > --- > src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c >

Re: [Mesa-dev] [PATCH 12/18] meson: wire the new generator for es1 and es2

2018-11-23 Thread Dylan Baker
Quoting Emil Velikov (2018-11-23 05:26:18) > On 2018/11/21, Dylan Baker wrote: > > > > diff --git a/src/mapi/glapi/gen/meson.build > > > b/src/mapi/glapi/gen/meson.build > > > index f494e9707b6..fa06c7c5458 100644 > > > --- a/src/mapi/glapi/gen/meson.build > > > +++

Re: [Mesa-dev] [PATCH 2/2] winsys/amdgpu: explicitly declare whether buffer_map is permanent or not

2018-11-23 Thread Marek Olšák
On Thu, Nov 22, 2018 at 6:24 AM Nicolai Hähnle wrote: > On 21.11.18 21:27, Marek Olšák wrote: > > On Wed, Nov 21, 2018 at 12:57 PM Nicolai Hähnle > > wrote: > > > > From: Nicolai Hähnle > > > > > > Introduce a new

[Mesa-dev] [PATCH mesa] anv: correctly use vulkan 1.0 by default

2018-11-23 Thread Eric Engestrom
Per chapter 3.2 "Instances": > Providing a NULL VkInstanceCreateInfo::pApplicationInfo or providing > an apiVersion of 0 is equivalent to providing an apiVersion of > VK_MAKE_VERSION(1,0,0). Reported-by: Niklas Haas Fixes: 8c048af5890d43578ca4 "anv: Copy the appliation info into the instance"

[Mesa-dev] [RFC 07/13] mapi/glapi/gen: Add python module with abstractions from Khronos XML

2018-11-23 Thread Dylan Baker
These helpers form an abstraction over the krhonos XML and help deal with some of the warts of the XML format, as well as generally making the XML easier to work with. --- src/mapi/glapi/gen/Makefile.am | 3 +- src/mapi/glapi/gen/khr_xml.py | 180 + 2 files

[Mesa-dev] [RFC 10/13] wip

2018-11-23 Thread Dylan Baker
--- src/mapi/glapi/gen/khr_xml.py | 81 +-- 1 file changed, 78 insertions(+), 3 deletions(-) diff --git a/src/mapi/glapi/gen/khr_xml.py b/src/mapi/glapi/gen/khr_xml.py index 784931b5059..7909afb922d 100644 --- a/src/mapi/glapi/gen/khr_xml.py +++

[Mesa-dev] [RFC 05/13] gen_mesa_data: script to convert mesa xml into mesa_data entries

2018-11-23 Thread Dylan Baker
--- src/mapi/glapi/gen/gen_mesa_data.py | 62 + 1 file changed, 62 insertions(+) create mode 100755 src/mapi/glapi/gen/gen_mesa_data.py diff --git a/src/mapi/glapi/gen/gen_mesa_data.py b/src/mapi/glapi/gen/gen_mesa_data.py new file mode 100755 index

[Mesa-dev] [RFC 09/13] begin generalizing gl_marshal_h.py for doing both.

2018-11-23 Thread Dylan Baker
This is undiffed, but does generate successfully. --- src/mapi/glapi/gen/gl_marshal_h.py | 166 + src/mesa/main/meson.build | 3 +- 2 files changed, 145 insertions(+), 24 deletions(-) diff --git a/src/mapi/glapi/gen/gl_marshal_h.py

[Mesa-dev] [PATCH 3/7] winsys/amdgpu: optimize slab allocation for 2 MB amdgpu page tables

2018-11-23 Thread Marek Olšák
From: Marek Olšák - the slab buffer size increased from 128 KB to 2 MB (PTE fragment size) - the max suballocated buffer size increased from 64 KB to 256 KB, this increases memory usage because it wastes memory - the number of suballocators increased from 1 to 3 and they are layered on top

[Mesa-dev] [PATCH 2/7] radeonsi: generalize the slab allocator code to allow layered slab allocators

2018-11-23 Thread Marek Olšák
From: Marek Olšák There is no change in behavior. It just makes it easier to change the number of slab allocators. --- src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 60 +++ src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 40 +

[Mesa-dev] [PATCH 4/7] winsys/amdgpu: clean up code around BO VM alignment

2018-11-23 Thread Marek Olšák
From: Marek Olšák --- src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index a9271c33ee9..36e2c4ec0dc 100644 ---

  1   2   >