Re: [Mesa-dev] [PATCH] mesa: Don't advertise GL_OES_read_format in core profile

2017-01-23 Thread Kenneth Graunke
On Monday, January 23, 2017 11:23:13 AM PST Ian Romanick wrote: > From: Ian Romanick > > OpenGL ES implementations are not allowed to ship ARB extensions, and > OpenGL implementations are not allowed to ship OES extensions. > > The functionality is also included in GL_ARB_ES2_compatibility. Eve

Re: [Mesa-dev] [PATCH] gallium/radeon: add a new HUD query for the number of mapped buffers

2017-01-23 Thread Michel Dänzer
On 24/01/17 05:44 AM, Samuel Pitoiset wrote: > Useful when debugging applications which map too much VRAM. Is the number of mapped buffers really useful, as opposed to the total size of buffer mappings? Even if it was the latter though, it doesn't show which mappings are for BOs in VRAM vs GTT, do

Re: [Mesa-dev] [PATCH 08/37] glsl: add initial implementation of shader cache

2017-01-23 Thread Timothy Arceri
On Tue, 2017-01-24 at 07:54 +0200, Tapani Pälli wrote: > Hi Timothy; > > On 01/24/2017 01:12 AM, Timothy Arceri wrote: > > From: Timothy Arceri > > > > 8< > > > + > > +static void > > +write_uniforms(struct blob *metadata, struct gl_shader_program > > *prog) > > +{ > > +   blob_write_uint32(me

[Mesa-dev] [PATCH 32/34] i965/miptree: Remove dead code assertion

2017-01-23 Thread Ben Widawsky
We no longer allocate a miptree for the mcs_buf, so this is not a useful assertion. While here, move the CCS disabling so that we only conditionally shut it off. This helps us dtrt later when CCS is used in more places. Recommended-by: Topi Pohjolainen Signed-off-by: Ben Widawsky --- src/mesa/

[Mesa-dev] [PATCH 33/34] i965: Remove scanout restriction from lossless compression

2017-01-23 Thread Ben Widawsky
v2: Try to keep the assert as recommended by Topi. This requires modifying the num_samples check to be <= 1 because internally created buffers set num_samples = 0. v3: Buffers are proactively marked as scanout, often, and so checking is_scanout in whether or not the buffer supports non-msrt fast c

[Mesa-dev] [PATCH 30/34] i965: Add new resolve hints full and partial

2017-01-23 Thread Ben Widawsky
Upper layers of the code will have the need to specify full or partial resolves (more on this in the next patch). This code simply adds the new enums and plumbs it in as minimally as necessary. Signed-off-by: Ben Widawsky Acked-by: Daniel Stone Reviewed-by: Topi Pohjolainen --- src/mesa/driver

[Mesa-dev] [PATCH 28/34] i965: Change resolve flags to enum

2017-01-23 Thread Ben Widawsky
In the foreseeable future it doesn't seem to make sense to have multiple resolve flags. What does make sense is to have the caller give an indication to the lower layers what it things should be done for resolve. The enum change distinguishes this binary selection. v2: Make setting the hint more c

[Mesa-dev] [PATCH 29/34] i965: Plumb resolve hints from miptrees to blorp

2017-01-23 Thread Ben Widawsky
Signed-off-by: Ben Widawsky Acked-by: Daniel Stone Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_blorp.c | 3 ++- src/mesa/drivers/dri/i965/brw_blorp.h | 3 ++- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletion

[Mesa-dev] [PATCH 34/34] i965: Handle compression modifier

2017-01-23 Thread Ben Widawsky
FINISHME: Use the kernel's final choice for the fb modifier bwidawsk@norris2:~/intel-gfx/kmscube (modifiers $) ~/scripts/measure_bandwidth.sh ./kmscube none Read bandwidth: 603.91 MiB/s Write bandwidth: 615.28 MiB/s bwidawsk@norris2:~/intel-gfx/kmscube (modifiers $) ~/scripts/measure_bandwidth.s

[Mesa-dev] [PATCH 24/34] i965/miptree: Add a return for updating of winsys

2017-01-23 Thread Ben Widawsky
There is nothing particularly useful to do currently if the update fails, but there is no point carrying on either. As a result, this has a behavior change. v2: Make the return type a bool (Topi) Signed-off-by: Ben Widawsky Acked-by: Daniel Stone Reviewed-by: Topi Pohjolainen --- src/mesa/dri

[Mesa-dev] [PATCH 31/34] i965: Use partial resolves for CCS buffers being scanned out

2017-01-23 Thread Ben Widawsky
On Gen9 hardware, the display engine is able to scanout a compressed framebuffer by providing an offset to auxiliary compression information. Unfortunately, the hardware is incapable of doing the same thing for the fast clear color. To mitigate this, the hardware introduced a new resolve type call

[Mesa-dev] [PATCH 22/34] i965: Allocate tile aligned height

2017-01-23 Thread Ben Widawsky
This patch shouldn't actually do anything because the libdrm function should already do this alignment. However, it preps us for a future patch where we add in the CCS AUX size, and in the process it serves as a good place to find bisectable issues if libdrm or kernel does something incorrectly. S

[Mesa-dev] [PATCH 27/34] i965: Make CCS stride match kernel's expectations

2017-01-23 Thread Ben Widawsky
v2: Put the commit message as a comment (Topi) Cc: Topi Pohjolainen Cc: Ville Syrjälä Cc: Jason Ekstrand Signed-off-by: Ben Widawsky Acked-by: Daniel Stone --- src/mesa/drivers/dri/i965/intel_screen.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dr

[Mesa-dev] [PATCH 25/34] i965/miptree: Allocate mt earlier in update winsys

2017-01-23 Thread Ben Widawsky
Allows us to continue utilizing common miptree creation using __DRIimage without creating a new DRIimage (for the intel_process_dri2_buffer() case). This is a bit ugly, but I think it's the best one can do. Signed-off-by: Ben Widawsky Acked-by: Daniel Stone --- src/mesa/drivers/dri/i965/brw_co

[Mesa-dev] [PATCH 26/34] i965: Pretend that CCS modified images are two planes

2017-01-23 Thread Ben Widawsky
Signed-off-by: Ben Widawsky Acked-by: Daniel Stone --- src/mesa/drivers/dri/i965/intel_screen.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 971013f2dd..85070bb54

[Mesa-dev] [PATCH 20/34] i965: Restructure CCS disable

2017-01-23 Thread Ben Widawsky
Make the code only disable CCS when it has to, unlike before where it disabled CCS and enabled it when it could. This is much more inline with how it should work in a few patches, where we have fewer restrictions as to when we disable CCS. Signed-off-by: Ben Widawsky --- src/mesa/drivers/dri/i96

[Mesa-dev] [PATCH 18/34] i965/miptree: Add a helper functions for image creation

2017-01-23 Thread Ben Widawsky
This provides a common function or creating miptrees when there is an existing DRIimage to use. That provides an easy way to add CCS allocation. Signed-off-by: Ben Widawsky Acked-by: Daniel Stone --- src/mesa/drivers/dri/i965/intel_fbo.c | 17 - src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 16/34] i965: Separate image allocation with modifiers

2017-01-23 Thread Ben Widawsky
Since the code doesn't support modifiers yet, this patch should do nothing other than prepare for more patches. Signed-off-by: Ben Widawsky Acked-by: Daniel Stone --- src/mesa/drivers/dri/i965/intel_screen.c | 64 1 file changed, 49 insertions(+), 15 deletions(-

[Mesa-dev] [PATCH 17/34] i965: Support images with offset aux buffers

2017-01-23 Thread Ben Widawsky
Previously our aux buffers (MCS, and HiZ) never had an offset because they were in their own buffer object. When using the CCS lossless compression feature, it's desirable to store the data at an offset from the main framebuffer, ie. share a buffer object. This patch just makes having an aux offset

[Mesa-dev] [PATCH 23/34] i965: Add logic for allocating BO with CCS

2017-01-23 Thread Ben Widawsky
This patch provides the support (and comments) for allocating the BO with space for the CCS buffer just underneath it. This patch was originally titled: "i965: Create correctly sized mcs for an image" In order to make things more bisectable, reviewable, and to have the CCS_MODIFIER token saved fo

[Mesa-dev] [PATCH 21/34] i965: Support all known modifiers

2017-01-23 Thread Ben Widawsky
This patch adds support for handling X tiled modifier. This isn't particularly useful but it makes our code complete. Signed-off-by: Ben Widawsky Acked-by: Daniel Stone --- src/mesa/drivers/dri/i965/intel_screen.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/s

[Mesa-dev] [PATCH 19/34] i965/miptree: Allocate mcs_buf for an image's CCS_E

2017-01-23 Thread Ben Widawsky
This code will disable actually creating these buffers for the scanout, but it puts the allocation in place. Primarily this patch is split out for review, it can be squashed in later if preferred. v2: assert(mt->offset == 0) in ccs creation (as requested by Topi) Remove bogus is_scanout check in

[Mesa-dev] [PATCH 13/34] i965: Handle X tiled modifier

2017-01-23 Thread Ben Widawsky
This doesn't really "do" anything because the default tiling for the winsys buffer is X tiled. We do however want the X tiled modifier to work correctly from the API perspective, which would imply that if you set this modifier, and later do a get_modifier, you get back at least X tiled. Cc: Kristi

[Mesa-dev] [PATCH 14/34] gbm: Get modifiers from DRI

2017-01-23 Thread Ben Widawsky
Replace the naive, 'save all the modifiers' with a proper query for just the modifier that was selected. To accomplish this, two new query tokens are added to the extension: __DRI_IMAGE_ATTRIB_MODIFIER_UPPER __DRI_IMAGE_ATTRIB_MODIFIER_LOWER The query extension only supported 32b queries, and modi

[Mesa-dev] [PATCH 15/34] i965: Bump the image extension version number

2017-01-23 Thread Ben Widawsky
This will expose all the modifier based APIs used by GBM. This patch was split out for v3 of the series. Signed-off-by: Ben Widawsky --- src/mesa/drivers/dri/i965/intel_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/m

[Mesa-dev] [PATCH 10/34] gbm: Introduce modifiers into surface/bo creation

2017-01-23 Thread Ben Widawsky
The idea behind modifiers like this is that the user of GBM will have some mechanism to query what properties the hardware supports for its BO or surface. This information is directly passed in (and stored) so that the DRI implementation can create an image with the appropriate attributes. A gette

[Mesa-dev] [PATCH 11/34] i965: Handle the linear fb modifier

2017-01-23 Thread Ben Widawsky
At image creation create a path for dealing with the linear modifier. This works exactly like the old usage flags where __DRI_IMAGE_USE_LINEAR was specified. During development of this patch series, it was decided that a lack of modifier was an insufficient way to express the required modifiers. A

[Mesa-dev] [PATCH 09/34] dri: Add an image creation with modifiers

2017-01-23 Thread Ben Widawsky
Modifiers will be obtains or guessed by the client and passed in during image creation/import. This requires bumping the DRIimage version. As of this patch, the modifiers aren't plumbed all the way down, this patch simply makes sure the interface level stuff is correct. v2: Don't allow usage + m

[Mesa-dev] [PATCH 12/34] i965: Handle Y-tile modifier

2017-01-23 Thread Ben Widawsky
This patch begins introducing how we'll actually handle the potentially many modifiers coming in from the API, how we'll store them, and the structure in the code to support it. Prior to this patch, the Y-tiled modifier would be entirely ignored. It shouldn't actually be used until this point beca

[Mesa-dev] [PATCH 08/34] i965/dri: Store the screen associated with the image

2017-01-23 Thread Ben Widawsky
I intend to need to get to the devinfo structure, and storing the screen is an easy way to do that. It seems to be the consensus that you cannot share an image between multiple screens. Scape-goat: Rob Clark Signed-off-by: Ben Widawsky Reviewed-by: Eric Engestrom Acked-by: Daniel Stone --- s

[Mesa-dev] [PATCH 02/34] gbm: Fix width height getters return type (trivial)

2017-01-23 Thread Ben Widawsky
v2: Other way round... to make consistent, make both return type have the fixed width - uint32_t. Cc: Daniel Stone Signed-off-by: Ben Widawsky Reviewed-by: Eric Engestrom Acked-by: Daniel Stone --- src/gbm/main/gbm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/

[Mesa-dev] [PATCH 03/34] gbm: Export a plane getter function

2017-01-23 Thread Ben Widawsky
This will be used by clients that need to know the number of planes allocated for them on behalf of the GL or other API. The best current example of this is when an extra "plane" is allocated to store compression data for the primary plane. v2: Return 1 for cases where there is no image, ie. dumb

[Mesa-dev] [PATCH 07/34] gbm: Export a per plane getter for offset

2017-01-23 Thread Ben Widawsky
Unlike stride, there was no previous offset getter, so it can be right on the first try. v2: Return EINVAL when plane is greater than total planes to make it match the similar APIs. Avoid leak after fromPlanar (Daniel) Make sure when getting offsets we consider dumb images (Daniel) Signed-off-by:

[Mesa-dev] [PATCH 06/34] gbm: Export a per plane getter for stride

2017-01-23 Thread Ben Widawsky
v2: Preserve legacy behavior when plane is 0 (Jason Ekstrand) EINVAL when input plane is greater than total planes (Jason Ekstrand) Don't leak the image after fromPlanar (Daniel) Move bo->image check below plane count preventing bad index succeeding (Daniel) Signed-off-by: Ben Widawsky Reviewed-b

[Mesa-dev] [PATCH 04/34] gbm: Export a getter for per plane handles

2017-01-23 Thread Ben Widawsky
v2: Make the error return be -1 instead of 0 because I think 0 is actually valid. v3: Set errno to EINVAL when the specified plane is above the total planes. (Jason Ekstrand) Return the bo's handle if there is no image ie. for dumb images like cursor (Daniel) Signed-off-by: Ben Widawsky Acked-b

[Mesa-dev] [PATCH 05/34] gbm: Create a gbm_device getter for stride

2017-01-23 Thread Ben Widawsky
This will be used so we can query information per plane. Signed-off-by: Ben Widawsky Reviewed-by: Eric Engestrom Acked-by: Daniel Stone --- src/gbm/backends/dri/gbm_dri.c | 7 +++ src/gbm/main/gbm.c | 2 +- src/gbm/main/gbmint.h | 1 + 3 files changed, 9 insertions(+),

[Mesa-dev] [PATCH 01/34] gbm: Move getters to match order in header file (trivial)

2017-01-23 Thread Ben Widawsky
Other things are out of order, but I need to add a getter so I'm just fixing those. This helps people adding to GBM know where the right place to put things is. Signed-off-by: Ben Widawsky Reviewed-by: Eric Engestrom Acked-by: Daniel Stone --- src/gbm/main/gbm.c | 22 +++--- 1

[Mesa-dev] [PATCH 00/34] [v3] Renderbuffer Decompression (and GBM modifiers)

2017-01-23 Thread Ben Widawsky
I've merged the first few patches from v2. I'd like to merge the GBM stuff at least this time around. Most of it has review but enough has changed that it probably needs eyes on it all again. Here is the branch: https://cgit.freedesktop.org/~bwidawsk/mesa/log/?h=modifiers Since v2 I've gotten GET

[Mesa-dev] [PATCH] gbm: add support for loading third-party backend

2017-01-23 Thread Qiang Yu
Third-party can put their backend to a directory configured with '--with-gbm-backenddir' and create a /etc/gbm.conf.d/*.conf file which contains the backend so file name to overwrite the default builtin DRI backend. The /etc/gbm.conf.d/*.conf will be sorted and the backends added will be tried one

Re: [Mesa-dev] [PATCH 08/37] glsl: add initial implementation of shader cache

2017-01-23 Thread Tapani Pälli
Hi Timothy; On 01/24/2017 01:12 AM, Timothy Arceri wrote: From: Timothy Arceri 8< + +static void +write_uniforms(struct blob *metadata, struct gl_shader_program *prog) +{ + blob_write_uint32(metadata, prog->SamplersValidated); + blob_write_uint32(metadata, prog->data->NumUniformStorage

[Mesa-dev] [PATCH 2/2] mesa: use same is_color_attachment trick to discern error cases

2017-01-23 Thread Ilia Mirkin
All the other calls to retrieve the attachment have been covered except this one - return the proper error for attachment points that are valid enums but out of bound for the driver. Fixes GL45-CTS.geometry_shader.layered_fbo.fb_texture_invalid_attachment Signed-off-by: Ilia Mirkin --- src/mesa

[Mesa-dev] [PATCH 1/2] mesa: make glFramebuffer* check immutable texture level bounds

2017-01-23 Thread Ilia Mirkin
When a texture is immutable, we can't tack on extra levels after-the-fact like we could with glTexImage. So check against that level limit and return an error if it's surpassed. The spec is a little unclear in that it says to check if "level is not a supported texture level", however that is never

[Mesa-dev] *please ignore* (personal email test)

2017-01-23 Thread Karl
*** This is a test, please discard *** Hi, I've been trying to send a patch lately and it seems that it does not get through the mailing list filters properly, since it does not have the [Mesa-dev] prefix added to its subject nor appear in patchwork. After talking to some people working for

[Mesa-dev] *please ignore* (personal email test)

2017-01-23 Thread Karl
*** This is a test, please discard *** Hi, I've been trying to send a patch lately and it seems that it does not get through the mailing list filters properly, since it does not have the [Mesa-dev] prefix added to its subject nor appear in patchwork. After talking to some people working for

[Mesa-dev] *please ignore* (personal email test)

2017-01-23 Thread Karl
*** This is a test, please discard *** Hi, I've been trying to send a patch lately and it seems that it does not get through the mailing list filters properly, since it does not have the [Mesa-dev] prefix added to its subject nor appear in patchwork. After talking to some people working for

Re: [Mesa-dev] [AMD] Screen flickering with 4K and RX 480, would be glad to help debugging

2017-01-23 Thread Timothy Arceri
On Mon, 2017-01-23 at 12:43 -0500, Romain Failliot wrote: > 2017-01-23 0:06 GMT-05:00 Timothy Arceri : > > I can confirm a similar problem. I have the same card and also got > > a 4K > > monitor recently. For me I was running a game in windowed mode (F1 > > 2015 > > I think) for a very short amount

Re: [Mesa-dev] [PATCH HACK] radeonsi: patch shader binary to use LEGACY variants of MUL/MAD

2017-01-23 Thread Ilia Mirkin
On Mon, Jan 23, 2017 at 10:51 PM, Ilia Mirkin wrote: > There are variants of the instructions that don't have legacy versions > that we don't prevent from being selected. As such, I think this > approach is doomed. > > Not for inclusion upstream. > --- > > On top of everything, totally untested. A

[Mesa-dev] [PATCH HACK] radeonsi: patch shader binary to use LEGACY variants of MUL/MAD

2017-01-23 Thread Ilia Mirkin
There are variants of the instructions that don't have legacy versions that we don't prevent from being selected. As such, I think this approach is doomed. Not for inclusion upstream. --- On top of everything, totally untested. And also unsure I got the instruction patching logic right - just goi

[Mesa-dev] [PATCH V3] glsl: lower constant arrays to uniform arrays before optimisation loop

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri Previously the constant array would not get copy propagated until the backend did its GLSL IR opt loop. I plan on removing that from i965 shortly which caused huge regressions in Deus-ex and Tomb Raider which have large constant arrays. Moving lowering before the opt loop in

[Mesa-dev] [PATCH 1/2] r600g: use ieee variants of multiplication instructions

2017-01-23 Thread Ilia Mirkin
This matches the behavior of most other drivers, including nouveau. Signed-off-by: Ilia Mirkin --- Untested. This also leaves RCP and RSQ with the clamped variants. I suspect this is wrong, but seems unrelated to multiplication per se. src/gallium/drivers/r600/r600_shader.c | 36 ++

[Mesa-dev] [PATCH 2/2] r600g: add support for optionally using non-IEEE mul ops

2017-01-23 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- Untested. Can be verified with Xnine. It should pass before 1/2 of this series, start failing with it, and pass again with 2/2 in place. src/gallium/drivers/r600/r600_pipe.c | 2 +- src/gallium/drivers/r600/r600_shader.c | 20 +--- 2 files chang

[Mesa-dev] [Bug 97102] [dri][swr] stack overflow / infinite loop with GALLIUM_DRIVER=swr

2017-01-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=97102 --- Comment #13 from Bruce Cherniak --- I pushed the change that corrects the crash you were seeing. This is the same as Tim's suggestion to prune empty nodes. I don't know all the other topologies well enough to suggest a change that heuristic

[Mesa-dev] [ANNOUNCE] mesa 12.0.6

2017-01-23 Thread Emil Velikov
Mesa 12.0.6 is now available. Note: This is an extra release for the 12.0 stable branch, as per developers' feedback. There are no plans to have further 12.0.x releases. Users are encouraged to migrate to the 13.0 series in order to obtain future fixes. In this release we have: Patch for the CSO

[Mesa-dev] [PATCH] radv: add back ability to gen some entrypoints from optional headers (v3)

2017-01-23 Thread Dave Airlie
From: Dave Airlie bf8e1f9e7 radv: generate entrypoints from vk.xml ripped out the ability to add extra header files (and writing extra xml files is a bit messier). For some non-public development or even developing future EXT/MESA extensions, it would be nice to allow this option before things la

Re: [Mesa-dev] [PATCH 1/2] anv/cmd_buffer: Don't temporarily enable CCS_E within a render pass

2017-01-23 Thread Nanley Chery
On Mon, Jan 23, 2017 at 05:42:44PM -0800, Jason Ekstrand wrote: > On Mon, Jan 23, 2017 at 5:40 PM, Nanley Chery wrote: > > > On Mon, Jan 23, 2017 at 05:30:22PM -0800, Jason Ekstrand wrote: > > > On Mon, Jan 23, 2017 at 4:55 PM, Nanley Chery > > wrote: > > > > > > > Compressing a render target an

Re: [Mesa-dev] [PATCH 1/2] anv/cmd_buffer: Don't temporarily enable CCS_E within a render pass

2017-01-23 Thread Jason Ekstrand
On Mon, Jan 23, 2017 at 5:40 PM, Nanley Chery wrote: > On Mon, Jan 23, 2017 at 05:30:22PM -0800, Jason Ekstrand wrote: > > On Mon, Jan 23, 2017 at 4:55 PM, Nanley Chery > wrote: > > > > > Compressing a render target and decompressing it in the same > > > single-subpass render pass may waste band

Re: [Mesa-dev] [PATCH 1/2] anv/cmd_buffer: Don't temporarily enable CCS_E within a render pass

2017-01-23 Thread Nanley Chery
On Mon, Jan 23, 2017 at 05:30:22PM -0800, Jason Ekstrand wrote: > On Mon, Jan 23, 2017 at 4:55 PM, Nanley Chery wrote: > > > Compressing a render target and decompressing it in the same > > single-subpass render pass may waste bandwidth. While this may be > > beneficial in some circumstances, it

Re: [Mesa-dev] [PATCH 1/2] anv/cmd_buffer: Don't temporarily enable CCS_E within a render pass

2017-01-23 Thread Jason Ekstrand
On Mon, Jan 23, 2017 at 4:55 PM, Nanley Chery wrote: > Compressing a render target and decompressing it in the same > single-subpass render pass may waste bandwidth. While this may be > beneficial in some circumstances, it does not help in all. > > Cc: "13.0 17.0" > This doesn't really fix a bu

[Mesa-dev] [PATCH] radv: add back ability to gen some entrypoints from optional headers (v2)

2017-01-23 Thread Dave Airlie
From: Dave Airlie bf8e1f9e7 radv: generate entrypoints from vk.xml ripped out the ability to add extra header files (and writing extra xml files is a bit messier). For some non-public development or even developing future EXT/MESA extensions, it would be nice to allow this option before things la

[Mesa-dev] [PATCH] anv: add KHR_get_physical_device_properties2 support

2017-01-23 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- src/intel/vulkan/anv_device.c | 593 + src/intel/vulkan/anv_formats.c | 42 +++ 2 files changed, 398 insertions(+), 237 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index f80

Re: [Mesa-dev] [PATCH] gallium/tgsi: fix memory leak in tgsi sanity check

2017-01-23 Thread Marc-André Lureau
Hi - Original Message - > Fix the leak of some ctx fields in error path. > > Signed-off-by: Li Qiang > --- > src/gallium/auxiliary/tgsi/tgsi_sanity.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c > b/src/gallium/a

[Mesa-dev] [PATCH] gallium/tgsi: fix oob access in parse instruction

2017-01-23 Thread Li Qiang
When parsing texture instruction, it doesn't stop if the 'cur' is ',', the loop variable 'i' will also be increased and be used to index the 'inst.TexOffsets' array. This can lead an oob access issue. This patch avoid this. Signed-off-by: Li Qiang --- src/gallium/auxiliary/tgsi/tgsi_text.c | 2 +

Re: [Mesa-dev] [PATCH] gallium/tgsi: fix oob access in parse instruction

2017-01-23 Thread Marc-André Lureau
Hi - Original Message - > When parsing texture instruction, it doesn't stop if the > 'cur' is ',', the loop variable 'i' will also be increased > and be used to index the 'inst.TexOffsets' array. This can lead > an oob access issue. This patch avoid this. > > Signed-off-by: Li Qiang > --

Re: [Mesa-dev] [PATCH] gallium/tgsi: fix oob access in parse instruction

2017-01-23 Thread Li Qiang
2017-01-23 16:17 GMT+08:00 Marc-André Lureau : > Hi > > - Original Message - > > When parsing texture instruction, it doesn't stop if the > > 'cur' is ',', the loop variable 'i' will also be increased > > and be used to index the 'inst.TexOffsets' array. This can lead > > an oob access iss

[Mesa-dev] [PATCH] gallium/tgsi: fix memory leak in tgsi sanity check

2017-01-23 Thread Li Qiang
Fix the leak of some ctx fields in error path. Signed-off-by: Li Qiang --- src/gallium/auxiliary/tgsi/tgsi_sanity.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c index f867925..c3d5094

[Mesa-dev] [PATCH 0/2] Reduce CCS_E-related Resolves

2017-01-23 Thread Nanley Chery
This series increases Dota 2 frame rates by about 2.61% on a SKL GT4 at 1080p. The first patch contributes to most of the gain. In the long-term, I think we'll want to rework our CCS implementation to perform resolves upon layout transitions. This will reduce the bandwidth consumed by resolves. I'

[Mesa-dev] [PATCH 2/2] anv/blorp: Disable partial resolves for transparent black clears

2017-01-23 Thread Nanley Chery
Cc: "13.0 17.0" Signed-off-by: Nanley Chery --- src/intel/vulkan/anv_blorp.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 2edd0712c9..4a4b479116 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src

Re: [Mesa-dev] [PATCH] i965/blorp: Use the correct ISL format for combined depth/stencil

2017-01-23 Thread Jason Ekstrand
On Mon, Jan 23, 2017 at 4:53 PM, Chad Versace wrote: > On Mon 23 Jan 2017, Jason Ekstrand wrote: > > In brw_blorp_copyteximage, we use the format from the render buffer. > > This could be a combined depth/stencil format. In this case, we handle > > stencil properly but we give blorp the wrong IS

[Mesa-dev] [PATCH 1/2] anv/cmd_buffer: Don't temporarily enable CCS_E within a render pass

2017-01-23 Thread Nanley Chery
Compressing a render target and decompressing it in the same single-subpass render pass may waste bandwidth. While this may be beneficial in some circumstances, it does not help in all. Cc: "13.0 17.0" Signed-off-by: Nanley Chery --- src/intel/vulkan/genX_cmd_buffer.c | 6 -- 1 file changed

[Mesa-dev] [PATCH] vulkan: Don't install vk_platform.h or vulkan.h.

2017-01-23 Thread Matt Turner
These files belong to the vulkan loader. --- src/intel/vulkan/Makefile.am | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am index fba3d66..95f276e 100644 --- a/src/intel/vulkan/Makefile.am +++ b/src/intel/vulkan/

Re: [Mesa-dev] [PATCH] i965/blorp: Use the correct ISL format for combined depth/stencil

2017-01-23 Thread Chad Versace
On Mon 23 Jan 2017, Jason Ekstrand wrote: > In brw_blorp_copyteximage, we use the format from the render buffer. > This could be a combined depth/stencil format. In this case, we handle > stencil properly but we give blorp the wrong ISL format. Specifically, > we would give blorp ISL_FORMAT_R32G3

[Mesa-dev] [PATCH] radv: add back ability to gen some entrypoints from optional headers

2017-01-23 Thread Dave Airlie
From: Dave Airlie bf8e1f9e7 radv: generate entrypoints from vk.xml ripped out the ability to add extra header files (and writing extra xml files is a bit messier). For some non-public development or even developing future EXT/MESA extensions, it would be nice to allow this option before things la

Re: [Mesa-dev] [PATCH] anv: Implement VK_KHR_get_physical_device_properties2

2017-01-23 Thread Jason Ekstrand
On Mon, Jan 23, 2017 at 4:25 PM, Chad Versace wrote: > On Mon 23 Jan 2017, Jason Ekstrand wrote: > > On Mon, Jan 23, 2017 at 3:31 PM, Chad Versace > wrote: > > > > On Mon 23 Jan 2017, Jason Ekstrand wrote: > > > On Mon, Jan 23, 2017 at 2:28 PM, Chad Versace < > chadvers...@chromium.org>

Re: [Mesa-dev] [PATCH] anv: Implement VK_KHR_get_physical_device_properties2

2017-01-23 Thread Chad Versace
On Mon 23 Jan 2017, Jason Ekstrand wrote: > On Mon, Jan 23, 2017 at 3:31 PM, Chad Versace > wrote: > > On Mon 23 Jan 2017, Jason Ekstrand wrote: > > On Mon, Jan 23, 2017 at 2:28 PM, Chad Versace > wrote: > > > >     Implement each vkFoo2KHR() by trivially passing it through

Re: [Mesa-dev] [PATCH 06/37] util: add a disk_cache_remove() function

2017-01-23 Thread Timothy Arceri
Apologies if you are wondering where this is used. This patch really should be before patch 24. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] anv: Implement VK_KHR_get_physical_device_properties2

2017-01-23 Thread Jason Ekstrand
On Mon, Jan 23, 2017 at 3:31 PM, Chad Versace wrote: > On Mon 23 Jan 2017, Jason Ekstrand wrote: > > On Mon, Jan 23, 2017 at 2:28 PM, Chad Versace > wrote: > > > > Implement each vkFoo2KHR() by trivially passing it through to the > > original vkFoo(). > > > > > > As I mentioned to Lionel

Re: [Mesa-dev] [PATCH 0/7] i965: Implement EGL_ANDROID_native_fence_sync

2017-01-23 Thread Chad Versace
Bump. Requesting more review please. On Fri 13 Jan 2017, Chad Versace wrote: > This series depends on fence fd support in I915_GEM_EXECBUFFER2, which > isn't upstream in libdrm nor the kernel yet. I tested this with kmscube > on Skylake, and everything looked good to me. > > I pushed tags for th

Re: [Mesa-dev] [PATCH 0/7] i965: Implement EGL_ANDROID_native_fence_sync

2017-01-23 Thread Chad Versace
On Fri 20 Jan 2017, Rafael Antognolli wrote: > I have tested this series with the branches that you mentioned, and with > piglit with the patches from my own branch: > > https://github.com/rantogno/piglit/tree/review/fences-v02 > > Everything seems to work fine. You can add: > > Tested-by: Rafae

Re: [Mesa-dev] [PATCH] anv: Implement VK_KHR_get_physical_device_properties2

2017-01-23 Thread Chad Versace
On Mon 23 Jan 2017, Jason Ekstrand wrote: > On Mon, Jan 23, 2017 at 2:28 PM, Chad Versace > wrote: > > Implement each vkFoo2KHR() by trivially passing it through to the > original vkFoo(). > > > As I mentioned to Lionel when he wrote basically this exact same patch, I > think > that m

[Mesa-dev] [PATCH 36/37] glsl: reserve parameter storage on cache restore

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri Since we know how big the list will be we can allocate the storage upfront. --- src/compiler/glsl/shader_cache.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 91b79a5..0e7deb1 100644 --- a

[Mesa-dev] [PATCH 33/37] glsl/mesa: make a copy of FragData bindings in case of cache fallback

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri If the shader cache falls back to doing a compile and link we need the original FragData bindings as they could have changed after the program was first linked. --- src/compiler/glsl/shader_cache.cpp | 8 src/mesa/main/mtypes.h | 2 ++ src/mesa/main/sh

[Mesa-dev] [PATCH 37/37] glsl: create separate 32bit and 64bit versions of shader cache objects

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri Pointers will have different lengths so we simply create a different sha1 for each platform. In theory we should be able to share cached shaders as we cache all pointer as uint64_t however if a pointer is ever added to one of the structs we write to file with blob_write_byte

[Mesa-dev] [PATCH 31/37] util: make string_to_uint_map hash table public

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri This will allow us to make use of the hash_table_call_foreach() function from outside the object. --- src/util/string_to_uint_map.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/string_to_uint_map.h b/src/util/string_to_uint_map.h index e05

[Mesa-dev] [PATCH 35/37] glsl: don't try to load/store buffer object values in the cache

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri Also add an assert to catch buffer overflows. --- src/compiler/glsl/shader_cache.cpp | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index bb63da5..91b79a5 100644 ---

[Mesa-dev] [PATCH 32/37] glsl/mesa: make a copy of attribute bindings in case of cache fallback

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri If the shader cache falls back to doing a compile and link we need the original attribute bindings as they could have changed after the program was first linked. --- src/compiler/glsl/shader_cache.cpp | 15 +++ src/mesa/main/mtypes.h | 7 +++ src

[Mesa-dev] [PATCH 34/37] glsl: disable on disk shader cache when running as another user

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri --- src/util/disk_cache.c | 4 1 file changed, 4 insertions(+) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index da01be7..01fe4d3 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c @@ -142,6 +142,10 @@ disk_cache_create(void) struct stat

Re: [Mesa-dev] [PATCH 4/6] configure.ac: Set and use HAVE_GALLIUM_LLVM define

2017-01-23 Thread Roland Scheidegger
Am 23.01.2017 um 20:39 schrieb Tobias Droste: > Am Montag, 23. Januar 2017, 11:53:18 CET schrieb Jose Fonseca: >> On 20/01/17 02:48, Emil Velikov wrote: >>> On 19 January 2017 at 19:26, Tobias Droste wrote: Am Mittwoch, 18. Januar 2017, 18:45:04 CET schrieb Emil Velikov: > On 18 January 2

[Mesa-dev] [PATCH 29/37] glsl: skip more uniform initialisation when doing fallback linking

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri We already pull these values from the metadata cache so no need to recreate them. --- src/compiler/glsl/linker.cpp | 20 src/mesa/main/shaderobj.c| 8 +--- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/compiler/glsl/linker

[Mesa-dev] [PATCH 30/37] glsl: don't reprocess or clear UBOs on cache fallback

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri --- src/compiler/glsl/linker.cpp | 62 +++- src/mesa/main/shaderobj.c| 16 +++- 2 files changed, 42 insertions(+), 36 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 3271a19..705

[Mesa-dev] [PATCH 25/37] mesa/glsl: add cache_fallback flag to gl_shader_program_data

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri This will allow us to skip certain things when falling back to a full recompile on a cache miss such as avoiding reinitialising uniforms. In this chage we use it to avoid reading the program metadata from the cache and skipping linking during a fallback. --- src/compiler/gl

[Mesa-dev] [PATCH 26/37] glsl: make a copy of the shader source for use with cache fallback

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri A number of things can happen that change the shader source after it is compiled or linked. For example: - Source changed after it is first compiled - Source changed after linking - Shader detached after linking In order to be able to fallback to a full rebuild on a cache m

[Mesa-dev] [PATCH 28/37] glsl: don't lose uniform values when falling back to full compile

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri Here we skip the recreation of uniform storage if we are relinking after a cache miss. This is improtant because uniform values may have already been set by the application and we don't want to reset them. --- src/compiler/glsl/link_uniforms.cpp | 31 +++-

[Mesa-dev] [PATCH 24/37] glsl: track mesa version shader cache items were created with

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri Also remove cache item and fallback to full recompile if current Mesa version differs. V2: don't leak buffer --- src/compiler/glsl/shader_cache.cpp | 13 + 1 file changed, 13 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/sha

[Mesa-dev] [PATCH 23/37] glsl: cache uniform values

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri These may be lowered constant arrays or uniform values that we set before linking so we need to cache the actual uniform values. --- src/compiler/glsl/shader_cache.cpp | 33 + 1 file changed, 33 insertions(+) diff --git a/src/compiler/glsl/s

[Mesa-dev] [PATCH 22/37] glsl: make uniform values helper available for use elsewhere

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri --- src/compiler/glsl/link_uniforms.cpp | 2 +- src/compiler/glsl/linker.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp index 8930d26..41fd79a 100644 --- a/src/compi

[Mesa-dev] [PATCH 27/37] glsl: don't reference shader prog data during cache fallback

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri We already have a reference. --- src/compiler/glsl/linker.cpp | 3 ++- src/mesa/main/shaderobj.c| 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index fa9e154..d34ec97 100644 --- a/src/com

[Mesa-dev] [PATCH 18/37] glsl: store subroutine remap table in shader cache

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri --- src/compiler/glsl/shader_cache.cpp | 57 ++ 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index b5468a9..9ed1c4e 100644 --- a/src/compiler/glsl/s

[Mesa-dev] [PATCH 15/37] glsl: skip linking when current program has been retrieved from cache

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri The scenario is a program has been linked for the first time and we cache the program metadata, then glLinkProgram() is called for a second time. Since we will now retrieve the program metadata from cache we need to skip linking. --- src/compiler/glsl/shader_cache.cpp | 1 +

[Mesa-dev] [PATCH 20/37] glsl: add support for caching atomic buffers

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri --- src/compiler/glsl/shader_cache.cpp | 89 ++ 1 file changed, 89 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 29fc70a..9db4f25 100644 --- a/src/compiler/glsl/shader_cache.cpp

[Mesa-dev] [PATCH 21/37] glsl: cache some more image metadata

2017-01-23 Thread Timothy Arceri
From: Timothy Arceri --- src/compiler/glsl/shader_cache.cpp | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp index 9db4f25..358eb4f 100644 --- a/src/compiler/glsl/shader_cache.cpp +++ b/src/compiler/glsl/shad

  1   2   >