Re: [Mesa-dev] [PATCH] radv: Use structured intrinsics instead of indexing workaround for GFX9.

2018-11-19 Thread Samuel Pitoiset
On 11/16/18 10:30 PM, Bas Nieuwenhuizen wrote: On Fri, Nov 16, 2018 at 9:34 AM Samuel Pitoiset wrote: On 11/12/18 10:51 PM, Bas Nieuwenhuizen wrote: These force the index to be used in the instruction so we don't need the workaround. Totals: SGPRS: 1321642 -> 1321802 (0.01 %) VGPRS: 9436

[Mesa-dev] [PATCH 4/8] i965: Update the shadow miptree from the main to fake the ETC2 compression

2018-11-19 Thread Eleni Maria Stea
On GPUs gen < 8 that don't support ETC2 sampling/rendering we now fake the support using 2 mipmap trees: one (the main) that stores the compressed data for the Get* functions to work and one (the shadow) that stores the same data decompressed for the render/sampling to work. Added the intel_update

[Mesa-dev] [PATCH 3/8] i965: Faking the ETC2 compression on Gen < 8 GPUs using two miptrees.

2018-11-19 Thread Eleni Maria Stea
GPUs Gen < 8 cannot render ETC2 formats. So far, they converted the compressed EAC/ETC2 images to non-compressed RGB format images that they can render. When GetCompressed* functions were called, the pixels were returned in the RGB format and not the compressed format as expected. Trying to fix th

[Mesa-dev] [PATCH 2/8] i965: r8stencil_mt/needs_update renamed to shadow_mt/needs_update

2018-11-19 Thread Eleni Maria Stea
Renamed the r8stencil_mt and r8stencil_needs_update to shadow_mt and shadow_needs_update respectively to allow reusing the shadow_mt as a generic purpose secondary mipmap tree. --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 8 src/mesa/drivers/dri/i965/intel_mipmap_tree.c| 16

[Mesa-dev] [PATCH 1/8] i965: Removed assertions from intel_miptree_map_etc

2018-11-19 Thread Eleni Maria Stea
The assertions that the GL_MAP_WRITE_BIT and GL_MAP_INVALIDATE_RANGE_BIT in intel_miptree_map_etc should be removed since they will fail when the ETC miptree is mapped for reading. Fixes: KHR-GL45.direct_state_access.textures_compressed_subimage crash on Gen 7 GPUs. --- src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH 0/8] i965: improved the support for ETC2 formats on Gen 7

2018-11-19 Thread Eleni Maria Stea
Intel Gen7 GPUs don't have native support for ETC2 formats. We store the ETC2 images as RGBA in order to render them. This is a problem for GetCompressed* functions that should return compressed pixel values but return instead RGBA. With these patches, we store the compressed image data in the mai

[Mesa-dev] [PATCH 5/8] i965: Fixed the CopyImageSubData for ETC2 on Gen < 8

2018-11-19 Thread Eleni Maria Stea
CopyImageSubData couldn't work for the first draw call because intel_update_decompressed_shadow was called during the rendering. Moved the intel_update_decompressed_shadow in brw_predraw_resolve_inputs to fix this problem. --- src/mesa/drivers/dri/i965/brw_draw.c | 3 +++ 1 file changed, 3 inserti

[Mesa-dev] [PATCH 6/8] i965: Added support for ETC2 mipmaps

2018-11-19 Thread Eleni Maria Stea
Extended the intel_update_decompress_shadow to update all the mipmap tree levels so that we can display and run Get functions on mipmaps. --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 48 +++ 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/src/mesa/drivers/dri

[Mesa-dev] [PATCH 7/8] i965: Added support for ETC2 texture arrays on Gen7

2018-11-19 Thread Eleni Maria Stea
Modified the calculation of the number of slices in the intel_update_decompressed_shadow function to take the array length into account to support arrays. --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 8/8] i965: Enabled the OES_copy_image extension on Gen 7 GPUs

2018-11-19 Thread Eleni Maria Stea
OES_copy_image extension was disabled on Gen7 due to the lack of support for ETC2 images. Enabled it back. --- src/mesa/drivers/dri/i965/intel_extensions.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/me

Re: [Mesa-dev] [PATCH 2/4] i965: be more specific about FBO completeness errors

2018-11-19 Thread andrey simiklit
Hello, I tried to compile latest mesa master this morning but faced with a compilation error: intel_fbo.c: In function ‘intel_validate_framebuffer’: intel_fbo.c:696:25: error: ‘GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS’ undeclared (first use in this function); did you mean ‘GL_FRAMEBUFFER_INCOMPL

[Mesa-dev] [PATCH RFC] dri2: add support for linux-dmabuf-unstable-v1 version 4

2018-11-19 Thread emersion
This only implements the "primary_device" part. This allows EGL to work without relying on wl_drm anymore. --- This simple patch implements version 4, which is still in review on wayland-devel [1]. [1]: https://patchwork.freedesktop.org/series/52370/ src/egl/drivers/dri2/platform_wayland.c | 58

Re: [Mesa-dev] [PATCH 2/4] i965: be more specific about FBO completeness errors

2018-11-19 Thread Iago Toral
I was about to write about this too. I think the patch is not correct for a couple of reasons: 1. GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS is not defined for OpenGL, only for GL ES. The GL definition has the _EXT suffix and is included with a specific extension, so I don't think we can use it like th

Re: [Mesa-dev] [PATCH 2/4] i965: be more specific about FBO completeness errors

2018-11-19 Thread Gert Wollny
Am Montag, den 19.11.2018, 10:21 +0100 schrieb Iago Toral: > I was about to write about this too. I think the patch is not > correct for a couple of reasons: > > 1. GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS is not defined for OpenGL, > only for GL ES. The GL definition has the _EXT suffix and is inclu

Re: [Mesa-dev] [PATCH 2/4] i965: be more specific about FBO completeness errors

2018-11-19 Thread Iago Toral
On Mon, 2018-11-19 at 10:21 +0100, Iago Toral wrote: > I was about to write about this too. I think the patch is not > correct for a couple of reasons: > > 1. GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS is not defined for OpenGL, > only for GL ES. The GL definition has the _EXT suffix and is included >

Re: [Mesa-dev] [PATCH 2/4] i965: be more specific about FBO completeness errors

2018-11-19 Thread Gert Wollny
Am Montag, den 19.11.2018, 10:26 +0100 schrieb Iago Toral: > On Mon, 2018-11-19 at 10:21 +0100, Iago Toral wrote: > > I was about to write about this too. I think the patch is not > > correct for a couple of reasons: > > > > 1. GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS is not defined for OpenGL, > > o

[Mesa-dev] [PATCH] i965:use FRAMEBUFFER_UNSUPPORTED instead of FRAMEBUFFER_INCOMPLETE_DIMENSIONS

2018-11-19 Thread Gert Wollny
FRAMEBUFFER_INCOMPLETE_DIMENSIONS is not supported for GLES 3.0 and later and not defined for Desktop OpenGL. Instead use FRAMEBUFFER_UNSUPPORTED like it was done before. Thanks to Iago Toral and Andrey Simiklit for pointing out the problem and the details. Fixes: ebcde3454552adc6d3fea8af220

[Mesa-dev] [PATCH] nir: fix an assertion for 16-bit integers in nir_imm_intN_t()

2018-11-19 Thread Samuel Pitoiset
Fixes dEQP-VK.spirv_assembly.type.scalar.i16.* Fixes: 1f29f4db1e ("nir/builder: Assert that intN_t immediates fit") Signed-off-by: Samuel Pitoiset --- src/compiler/nir/nir_builder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_builder.h b/src/compile

[Mesa-dev] [PATCH] virgl: Use file descriptor instead of un-allocated object

2018-11-19 Thread Gert Wollny
From: Gert Wollny The structure qdws is not allocated at this point, nor is the file descriptor set to it's member. Use the fd directly instead. Fixes: d1a1c21e7621b5177febf191fcd3d3b8ef69dc96 virgl: native fence fd support Signed-off-by: Gert Wollny --- src/gallium/winsys/virgl/drm/virg

Re: [Mesa-dev] [PATCH] virgl: Use file descriptor instead of un-allocated object

2018-11-19 Thread Robert Foss
Hey Gert, Nice catch! Reviewed-by: Robert Foss On 2018-11-19 10:56, Gert Wollny wrote: From: Gert Wollny The structure qdws is not allocated at this point, nor is the file descriptor set to it's member. Use the fd directly instead. Fixes: d1a1c21e7621b5177febf191fcd3d3b8ef69dc96 vir

Re: [Mesa-dev] [PATCH] i965:use FRAMEBUFFER_UNSUPPORTED instead of FRAMEBUFFER_INCOMPLETE_DIMENSIONS

2018-11-19 Thread Iago Toral
Thanks! Reviewed-by: Iago Toral Quiroga On Mon, 2018-11-19 at 10:36 +0100, Gert Wollny wrote: > FRAMEBUFFER_INCOMPLETE_DIMENSIONS is not supported for GLES 3.0 and > later and > not defined for Desktop OpenGL. Instead use FRAMEBUFFER_UNSUPPORTED > like it > was done before. > > Thanks to Iago

Re: [Mesa-dev] [PATCH] i965:use FRAMEBUFFER_UNSUPPORTED instead of FRAMEBUFFER_INCOMPLETE_DIMENSIONS

2018-11-19 Thread Gert Wollny
Am Montag, den 19.11.2018, 11:00 +0100 schrieb Iago Toral: > Thanks! and pushed, thank you too. > > Reviewed-by: Iago Toral Quiroga > > On Mon, 2018-11-19 at 10:36 +0100, Gert Wollny wrote: > > FRAMEBUFFER_INCOMPLETE_DIMENSIONS is not supported for GLES 3.0 and > > later and > > not define

Re: [Mesa-dev] [PATCH] radv: don't force clearing the stencil aspect for LOAD_OP_DONT_CARE

2018-11-19 Thread Bas Nieuwenhuizen
On Thu, Nov 15, 2018 at 10:51 AM Samuel Pitoiset wrote: > > This has been initially added for a Sascha demo (ie. deferredshadows), > but as far I can tell this seems to no longer be needed. > > No CTS changes on GFX9 and I didn't find a game that is affected. > > Signed-off-by: Samuel Pitoiset >

Re: [Mesa-dev] Partial loop unrolling support

2018-11-19 Thread Timothy Arceri
On 19/11/18 5:18 pm, Timothy Arceri wrote> This series add support for partial loop unrolling for loops with an unknown trip count. The new partial_unroll function allows the caller to specifiy how may times the loop should be unrolled and then the loop is inserted in the innermost continue branc

Re: [Mesa-dev] [PATCH] radv: don't force clearing the stencil aspect for LOAD_OP_DONT_CARE

2018-11-19 Thread Samuel Pitoiset
On 11/19/18 11:56 AM, Bas Nieuwenhuizen wrote: On Thu, Nov 15, 2018 at 10:51 AM Samuel Pitoiset wrote: This has been initially added for a Sascha demo (ie. deferredshadows), but as far I can tell this seems to no longer be needed. No CTS changes on GFX9 and I didn't find a game that is affe

Re: [Mesa-dev] [PATCH] radv: don't force clearing the stencil aspect for LOAD_OP_DONT_CARE

2018-11-19 Thread Bas Nieuwenhuizen
On Mon, Nov 19, 2018 at 12:21 PM Samuel Pitoiset wrote: > > > > On 11/19/18 11:56 AM, Bas Nieuwenhuizen wrote: > > On Thu, Nov 15, 2018 at 10:51 AM Samuel Pitoiset > > wrote: > >> > >> This has been initially added for a Sascha demo (ie. deferredshadows), > >> but as far I can tell this seems to

Re: [Mesa-dev] [PATCH] nir: fix an assertion for 16-bit integers in nir_imm_intN_t()

2018-11-19 Thread Connor Abbott
This will cause the assert to pass when it shouldn't in some cases with a 32-bit bitsize, and seems like a hack since it's subverting the point of the assert, which is guarantee that we won't lose any information by truncating the source. It would be better to fix the caller that's hitting the asse

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

2018-11-19 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 repeated,

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

2018-11-19 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. Signed-o

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

2018-11-19 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 a/src/mesa/mai

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

2018-11-19 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 a/src/mesa/main/

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

2018-11-19 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 a/

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

2018-11-19 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 a/src/mesa/main

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

2018-11-19 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 for

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

2018-11-19 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 d504

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

2018-11-19 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_has_EXT

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

2018-11-19 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

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

2018-11-19 Thread Erik Faye-Lund
Here's a lengthy patch-series that aims to fix a few simple bugs, where invalid enums for texture formats were allowed when they shouldn't be. In general, this is a pattern of checking ctx->Extensions.FOO_bar instead of _mesa_has_FOO_bar(ctx). The difference is that the former is really just a dri

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

2018-11-19 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(+), 5

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

2018-11-19 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 ++ src/

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

2018-11-19 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 on

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

2018-11-19 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 te

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

2018-11-19 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 Faye-Lun

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

2018-11-19 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 16889074f66..

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

2018-11-19 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 b/src/mesa/main/glfor

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

2018-11-19 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. Sig

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

2018-11-19 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 che

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

2018-11-19 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 check.

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

2018-11-19 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 check

[Mesa-dev] [PATCH 30/30] mesa/st: require linear interpolation for ARB_texture_float

2018-11-19 Thread Erik Faye-Lund
There's nothing in the ARB_texture_float specification that limits filterability for floating-point textures, so we need to ensure that this is required to enable this extension. Luckily, we have just the right bits ready. Signed-off-by: Erik Faye-Lund --- src/mesa/state_tracker/st_extensions.c

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

2018-11-19 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 ins

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

2018-11-19 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 insertio

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

2018-11-19 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, let's

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

2018-11-19 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 b3c68bb865c..

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

2018-11-19 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. Signed-of

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

2018-11-19 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 enu

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

2018-11-19 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: Erik

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

2018-11-19 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(+),

Re: [Mesa-dev] [PATCH] radv: don't force clearing the stencil aspect for LOAD_OP_DONT_CARE

2018-11-19 Thread Samuel Pitoiset
On 11/19/18 12:25 PM, Bas Nieuwenhuizen wrote: On Mon, Nov 19, 2018 at 12:21 PM Samuel Pitoiset wrote: On 11/19/18 11:56 AM, Bas Nieuwenhuizen wrote: On Thu, Nov 15, 2018 at 10:51 AM Samuel Pitoiset wrote: This has been initially added for a Sascha demo (ie. deferredshadows), but as fa

[Mesa-dev] [PATCH v2] configure/vulkan: linking issue of Vulkan

2018-11-19 Thread Sergii Romantsov
From: Sergii Romantsov Xcb-dri3 is installed into custom directory. Installing of Vulkan on Ubuntu 16.04 fails during relinking. Potential reason: seems during relinking a path to the custom dri3-path is missed: glx.la depends on libloader_dri3_helper.la which depends on XCB_DRI3_LIBS. XCB_DRI3_L

Re: [Mesa-dev] [PATCH] virgl: fix vtest regression since fencing changes.

2018-11-19 Thread Robert Foss
Hey Dave, Thanks for catching this, pushed! On 2018-11-19 06:47, Dave Airlie wrote: From: Dave Airlie The in_fence_fd needs to be initialised to -1. Fixes: d1a1c21e7 (virgl: native fence fd support) --- src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c | 1 + 1 file changed, 1 insertion

Re: [Mesa-dev] [PATCH 00/14] freedreno: move all the things

2018-11-19 Thread Bas Nieuwenhuizen
With my limited knowledge of the parts up till now, this is Reviewed-by: Bas Nieuwenhuizen with the caveat that this might very well break the Android build. Have anyone to look at that or do I need to take a stab? On Mon, Nov 12, 2018 at 4:51 PM Rob Clark wrote: > > Moves drm and the ir3 comp

Re: [Mesa-dev] [PATCH 30/30] mesa/st: require linear interpolation for ARB_texture_float

2018-11-19 Thread Ilia Mirkin
Unfortunately this will drop GL 3.0 from Adreno A3xx. I think we'd rather fake linear interpolation with F32 textures which are never used than lose GL 3.0 there... On Mon, Nov 19, 2018 at 7:16 AM Erik Faye-Lund wrote: > > There's nothing in the ARB_texture_float specification that limits > filter

Re: [Mesa-dev] [PATCH mesa 3/3] meson: fix wayland-less builds

2018-11-19 Thread Juan A. Suarez Romero
On Thu, 2018-10-11 at 16:36 +0100, Eric Engestrom wrote: > Those empty variables in the !wayland case are useless and running that > meson.build with them breaks the build: > > [287/850] Generating wayland-drm-client-protocol.h with a custom command. > FAILED: src/egl/wayland/wayland-drm/wayla

Re: [Mesa-dev] [PATCH] meson: Don't set -Wall

2018-11-19 Thread Juan A. Suarez Romero
On Fri, 2018-11-09 at 13:28 -0800, Dylan Baker wrote: > meson does this for you with it's warn levels, so we don't need to set > it ourselves. > > Fixes: d1992255bb29054fa51763376d125183a9f602f3 >("meson: Add build Intel "anv" vulkan driver") Hi. I've cherry-picked this commit for next

Re: [Mesa-dev] [PATCH] r600: clean up the GS ring buffers when the context is destroyed

2018-11-19 Thread Roland Scheidegger
Reviewed-by: Roland Scheidegger From: mesa-dev on behalf of Gert Wollny Sent: Friday, November 16, 2018 6:06:15 PM To: mesa-dev@lists.freedesktop.org Subject: Re: [Mesa-dev] [PATCH] r600: clean up the GS ring buffers when the context is destroyed I fo

[Mesa-dev] [PATCH 2/2] anv: Expose VK_EXT_scalar_block_layout

2018-11-19 Thread Jason Ekstrand
Our compile already splits UBO loads into scalars and the untyped surface read messages we use for SSBO reads and writes only require dword alignment. --- src/intel/vulkan/anv_device.c | 7 +++ src/intel/vulkan/anv_extensions.py | 1 + 2 files changed, 8 insertions(+) diff --git a/src/in

[Mesa-dev] [PATCH 1/2] vulkan: Update the XML and headers to 1.1.93

2018-11-19 Thread Jason Ekstrand
--- include/vulkan/vulkan_core.h | 35 --- src/vulkan/registry/vk.xml | 84 +--- 2 files changed, 98 insertions(+), 21 deletions(-) diff --git a/include/vulkan/vulkan_core.h b/include/vulkan/vulkan_core.h index 4cd8ed51dcd..35c06649aa5 100644 --- a/in

Re: [Mesa-dev] [PATCH 30/30] mesa/st: require linear interpolation for ARB_texture_float

2018-11-19 Thread Erik Faye-Lund
On Mon, 2018-11-19 at 10:02 -0500, Ilia Mirkin wrote: > Unfortunately this will drop GL 3.0 from Adreno A3xx. I think we'd > rather fake linear interpolation with F32 textures which are never > used than lose GL 3.0 there... Right... I guess this means that this GPU never really did support OpenG

Re: [Mesa-dev] [PATCH] nir: fix an assertion for 16-bit integers in nir_imm_intN_t()

2018-11-19 Thread Jason Ekstrand
agreed. On Mon, Nov 19, 2018 at 5:57 AM Connor Abbott wrote: > This will cause the assert to pass when it shouldn't in some cases > with a 32-bit bitsize, and seems like a hack since it's subverting the > point of the assert, which is guarantee that we won't lose any > information by truncating

Re: [Mesa-dev] Partial loop unrolling support

2018-11-19 Thread Jason Ekstrand
I also saw a case last week where the induction variable is <= imax(thing, 4) and it'd be nice to unroll those too. --Jason On Mon, Nov 19, 2018 at 12:18 AM Timothy Arceri wrote: > This series add support for partial loop unrolling for loops with an > unknown trip count. The new partial_unroll

Re: [Mesa-dev] [PATCH 00/14] freedreno: move all the things

2018-11-19 Thread Rob Clark
On Mon, Nov 19, 2018 at 9:40 AM Bas Nieuwenhuizen wrote: > > With my limited knowledge of the parts up till now, this is > > Reviewed-by: Bas Nieuwenhuizen > > with the caveat that this might very well break the Android build. > Have anyone to look at that or do I need to take a stab? I'm pretty

Re: [Mesa-dev] [PATCH 1/2] vulkan: Update the XML and headers to 1.1.93

2018-11-19 Thread Bas Nieuwenhuizen
Reviewed-by: Bas Nieuwenhuizen On Mon, Nov 19, 2018 at 4:39 PM Jason Ekstrand wrote: > > --- > include/vulkan/vulkan_core.h | 35 --- > src/vulkan/registry/vk.xml | 84 +--- > 2 files changed, 98 insertions(+), 21 deletions(-) > > diff --git a/includ

Re: [Mesa-dev] [PATCH 30/30] mesa/st: require linear interpolation for ARB_texture_float

2018-11-19 Thread Ilia Mirkin
On Mon, Nov 19, 2018 at 10:40 AM Erik Faye-Lund wrote: > > On Mon, 2018-11-19 at 10:02 -0500, Ilia Mirkin wrote: > > Unfortunately this will drop GL 3.0 from Adreno A3xx. I think we'd > > rather fake linear interpolation with F32 textures which are never > > used than lose GL 3.0 there... > > Righ

Re: [Mesa-dev] [PATCH 30/30] mesa/st: require linear interpolation for ARB_texture_float

2018-11-19 Thread Erik Faye-Lund
On Mon, 2018-11-19 at 11:13 -0500, Ilia Mirkin wrote: > On Mon, Nov 19, 2018 at 10:40 AM Erik Faye-Lund > wrote: > > On Mon, 2018-11-19 at 10:02 -0500, Ilia Mirkin wrote: > > > Unfortunately this will drop GL 3.0 from Adreno A3xx. I think > > > we'd > > > rather fake linear interpolation with F32

Re: [Mesa-dev] [PATCH 30/30] mesa/st: require linear interpolation for ARB_texture_float

2018-11-19 Thread Ilia Mirkin
On Mon, Nov 19, 2018 at 11:30 AM Erik Faye-Lund wrote: > > On Mon, 2018-11-19 at 11:13 -0500, Ilia Mirkin wrote: > > On Mon, Nov 19, 2018 at 10:40 AM Erik Faye-Lund > > wrote: > > > On Mon, 2018-11-19 at 10:02 -0500, Ilia Mirkin wrote: > > > > Unfortunately this will drop GL 3.0 from Adreno A3xx.

Re: [Mesa-dev] [PATCH 30/30] mesa/st: require linear interpolation for ARB_texture_float

2018-11-19 Thread Erik Faye-Lund
On Mon, 2018-11-19 at 11:37 -0500, Ilia Mirkin wrote: > On Mon, Nov 19, 2018 at 11:30 AM Erik Faye-Lund > wrote: > > On Mon, 2018-11-19 at 11:13 -0500, Ilia Mirkin wrote: > > > On Mon, Nov 19, 2018 at 10:40 AM Erik Faye-Lund > > > wrote: > > > > On Mon, 2018-11-19 at 10:02 -0500, Ilia Mirkin wrot

Re: [Mesa-dev] [PATCH] meson: Don't set -Wall

2018-11-19 Thread Dylan Baker
Quoting Juan A. Suarez Romero (2018-11-19 07:17:14) > On Fri, 2018-11-09 at 13:28 -0800, Dylan Baker wrote: > > meson does this for you with it's warn levels, so we don't need to set > > it ourselves. > > > > Fixes: d1992255bb29054fa51763376d125183a9f602f3 > >("meson: Add build Intel "anv"

Re: [Mesa-dev] [PATCH mesa 3/3] meson: fix wayland-less builds

2018-11-19 Thread Eric Engestrom
On Monday, 2018-11-19 16:15:24 +0100, Juan A. Suarez Romero wrote: > On Thu, 2018-10-11 at 16:36 +0100, Eric Engestrom wrote: > > Those empty variables in the !wayland case are useless and running that > > meson.build with them breaks the build: > > > > [287/850] Generating wayland-drm-client-pr

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

2018-11-19 Thread Erik Faye-Lund
On Mon, 2018-11-19 at 18:43 +0100, Francesco Ansanelli wrote: > Hi Eric, > > While checking this patch I noticed an extra semicolon in this > function: > +static inline bool > +_mesa_has_half_float_textures(const struct gl_context *ctx) > +{ > + return _mesa_has_ARB_texture_float(ctx) || > +

[Mesa-dev] [PATCH] nir/deref: Support casts in comparisons

2018-11-19 Thread Jason Ekstrand
The code which constructs deref paths already gives you the path starting at the nearest deref_cast or deref_var. All we need to do is handle the case where the start of the path isn't a deref_var. Cc: Karol Herbst Cc: Dave Airlie --- src/compiler/nir/nir_deref.c | 42 +

[Mesa-dev] [PATCH 1/2] radv: remove dependency on addrlib gfx9_enum.h

2018-11-19 Thread Nicolai Hähnle
From: Nicolai Hähnle --- src/amd/common/sid.h | 3 +++ src/amd/vulkan/radv_cmd_buffer.c | 6 ++ src/amd/vulkan/radv_device.c | 9 - 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/amd/common/sid.h b/src/amd/common/sid.h index 35782046dd5..49683f1aa5

[Mesa-dev] [PATCH 0/2] amd/addrlib: update Mesa's copy of addrlib

2018-11-19 Thread Nicolai Hähnle
d the same tooling that is used for AMDVLK. Hopefully that will make things simpler going forward. Since the main patch is pretty big, I've also put it here: https://gitlab.freedesktop.org/nh/mesa/tree/addrlib-update-20181119 Please review! Thanks, Nicolai _

Re: [Mesa-dev] [PATCH v2 26/32] intel/isl: Add support for computing offsets with miptails

2018-11-19 Thread Pohjolainen, Topi
On Fri, Oct 12, 2018 at 01:46:56PM -0500, Jason Ekstrand wrote: > Unfortunately, there is no nice way to calculate miptail offsets in > closed form. Instead, we just copy the tables from the PRM directly > verbatim. > --- > src/intel/isl/isl.c | 217 +++- >

[Mesa-dev] [PATCH] nir/derefs: Add a nir_derefs_do_not_alias enum value

2018-11-19 Thread Jason Ekstrand
This makes some of the code more clear. --- src/compiler/nir/nir_deref.c | 8 src/compiler/nir/nir_deref.h | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir_deref.c b/src/compiler/nir/nir_deref.c index 59b36a7f255..68a3aad5c70 100644 --- a/src/comp

Re: [Mesa-dev] [PATCH v2 27/32] intel/isl: Add units to view dimensions in isl_surf_get_uncompressed_surf

2018-11-19 Thread Pohjolainen, Topi
On Fri, Oct 12, 2018 at 01:46:57PM -0500, Jason Ekstrand wrote: > --- > src/intel/isl/isl.c | 27 ++- > 1 file changed, 14 insertions(+), 13 deletions(-) Reviewed-by: Topi Pohjolainen > > diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c > index c86390bf851..88de14

Re: [Mesa-dev] [PATCH 1/2] radv: remove dependency on addrlib gfx9_enum.h

2018-11-19 Thread Dave Airlie
On Tue, 20 Nov 2018 at 04:30, Nicolai Hähnle wrote: > > From: Nicolai Hähnle > > --- > src/amd/common/sid.h | 3 +++ > src/amd/vulkan/radv_cmd_buffer.c | 6 ++ > src/amd/vulkan/radv_device.c | 9 - > 3 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/sr

Re: [Mesa-dev] [PATCH v2 28/32] intel/isl: Support miptails in isl_surf_get_uncompressed_surf

2018-11-19 Thread Pohjolainen, Topi
On Fri, Oct 12, 2018 at 01:46:58PM -0500, Jason Ekstrand wrote: > --- > src/intel/isl/isl.c | 45 +++-- > 1 file changed, 35 insertions(+), 10 deletions(-) Reviewed-by: Topi Pohjolainen > > diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c > index 8

Re: [Mesa-dev] Lets talk about autotools

2018-11-19 Thread Dylan Baker
Sorry, cell phones are really bad for responding to email... The file has the same rules as cross files, it can be a local file, passed as an absolute path, or read from $XDG directories (local files will be read before XDG ones). Dylan Quoting Dylan Baker (2018-11-18 09:01:27) > That file can l

Re: [Mesa-dev] [PATCH v2 29/32] intel/isl: Disallow CCS on 3D surfaces with miptails

2018-11-19 Thread Pohjolainen, Topi
On Fri, Oct 12, 2018 at 01:46:59PM -0500, Jason Ekstrand wrote: > --- > src/intel/isl/isl.c | 19 +++ > 1 file changed, 19 insertions(+) Reviewed-by: Topi Pohjolainen > > diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c > index df4fb94a6fe..2513d2e73d1 100644 > --- a/src/

Re: [Mesa-dev] [PATCH 30/30] mesa/st: require linear interpolation for ARB_texture_float

2018-11-19 Thread Roland Scheidegger
FWIW this looks like a rather similar incident to me what happened when mesa began to verify the max vertex stride (which needs to be 2048 with GL 4.4 whereas r600 can only do 2047) where I argued it's a much better idea to lie about the GL version there rather than the specific vertex stride bi

Re: [Mesa-dev] [PATCH 1/2] radv: remove dependency on addrlib gfx9_enum.h

2018-11-19 Thread Samuel Pitoiset
On 11/19/18 7:37 PM, Dave Airlie wrote: On Tue, 20 Nov 2018 at 04:30, Nicolai Hähnle wrote: From: Nicolai Hähnle --- src/amd/common/sid.h | 3 +++ src/amd/vulkan/radv_cmd_buffer.c | 6 ++ src/amd/vulkan/radv_device.c | 9 - 3 files changed, 9 insertions(+),

Re: [Mesa-dev] [PATCH 3/3] nir: handle shared pointers in lowering indirect derefs.

2018-11-19 Thread Jason Ekstrand
On Sun, Nov 18, 2018 at 9:57 PM Dave Airlie wrote: > From: Dave Airlie > > Check if the base ends up with no variable, and continue > if we see that case outside the loop. > --- > src/compiler/nir/nir_lower_indirect_derefs.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/compi

Re: [Mesa-dev] [PATCH 2/3] nir: move getting deref from var after we check deref type.

2018-11-19 Thread Jason Ekstrand
Patches 1 and 2 are Reviewed-by: Jason Ekstrand As I commented on IRC, I'd recommend we also review and land my emit pointers on-the-fly patch. I don't know that it's strictly necessary but I do think it's better. On Sun, Nov 18, 2018 at 9:57 PM Dave Airlie wrote: > From: Dave Airlie > > I

Re: [Mesa-dev] [PATCH 16/28] Replace IROUND_POS with _mesa_roundevenf

2018-11-19 Thread Roland Scheidegger
Although I'm not sure we actually really wanted that rounding behavior in the first place - it's possible the only reason it was used is just because it had an easy implementation... From: Matt Turner Sent: Friday, November 16, 2018 8:02:00 PM To: Dylan

Re: [Mesa-dev] [PATCH v2 26/32] intel/isl: Add support for computing offsets with miptails

2018-11-19 Thread Jason Ekstrand
On Mon, Nov 19, 2018 at 12:30 PM Pohjolainen, Topi < topi.pohjolai...@gmail.com> wrote: > On Fri, Oct 12, 2018 at 01:46:56PM -0500, Jason Ekstrand wrote: > > Unfortunately, there is no nice way to calculate miptail offsets in > > closed form. Instead, we just copy the tables from the PRM directly

Re: [Mesa-dev] Lets talk about autotools

2018-11-19 Thread Dylan Baker
Quoting Gert Wollny (2018-11-18 02:56:00) > Am Freitag, den 16.11.2018, 20:04 -0800 schrieb Dylan Baker: > > > > Is there anything else we're missing in meson to be able to drop > > autotools? > > One thing that I notes is that it seems to be impossible to run the > test suite for just one subdir

Re: [Mesa-dev] Lets talk about autotools

2018-11-19 Thread Dylan Baker
Quoting Gert Wollny (2018-11-18 02:56:00) > Am Freitag, den 16.11.2018, 20:04 -0800 schrieb Dylan Baker: > > > > Is there anything else we're missing in meson to be able to drop > > autotools? > > One thing that I notes is that it seems to be impossible to run the > test suite for just one subdir

[Mesa-dev] [PATCH 1/3] glsl/nir: int constants as float for native_integers=false

2018-11-19 Thread Jonathan Marek
Note: the backend must take care that uniform index is now a float Signed-off-by: Jonathan Marek --- src/compiler/glsl/glsl_to_nir.cpp | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp inde

[Mesa-dev] [PATCH 2/3] glsl/nir: ftrunc for native_integers=false float to int cast

2018-11-19 Thread Jonathan Marek
out_type is always GLSL_TYPE_FLOAT, so we don't get the ftrunc otherwise since there are no other conversions needed, use fmov for the other cases (there is the f2b case, but the 1-bit bool patches should fix that) Signed-off-by: Jonathan Marek --- src/compiler/glsl/glsl_to_nir.cpp | 13 +++

  1   2   >