[Mesa-dev] [PATCH 2/4] radeonsi: rename cb_target_mask state to cb_render_state

2016-01-29 Thread Marek Olšák
From: Marek Olšák and rename a variable in the function. SX_PS_DOWNCONVERT will be emitted here. --- src/gallium/drivers/radeonsi/si_hw_context.c| 2 +- src/gallium/drivers/radeonsi/si_pipe.h | 2 +- src/gallium/drivers/radeonsi/si_state.c | 21

[Mesa-dev] [PATCH 3/4] radeonsi: rework RB+ for Stoney

2016-01-29 Thread Marek Olšák
From: Marek Olšák This fixes it. States which also need to be taken into account: - SPI color formats - each down-conversion format supports only a limited set of SPI formats - whether MSAA resolving and logic op are enabled These need special handling: - blending -

[Mesa-dev] [PATCH 4/4] radeonsi: fix Hyper-Z on Stoney

2016-01-29 Thread Marek Olšák
From: Marek Olšák Cc: 10.0 10.1 --- src/gallium/drivers/radeon/r600_texture.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index

[Mesa-dev] [PATCH 1/4] radeonsi: treat intensity render targets exactly like red

2016-01-29 Thread Marek Olšák
From: Marek Olšák The motivation is to simplify the Stoney RB+ code. Intensity is already treated as red except here. No piglit regressions. --- src/gallium/drivers/radeonsi/si_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH 4/4] radeonsi: fix Hyper-Z on Stoney

2016-01-29 Thread Nicolai Hähnle
On 29.01.2016 15:02, Marek Olšák wrote: From: Marek Olšák Cc: 10.0 10.1 "11.0 11.1" --- src/gallium/drivers/radeon/r600_texture.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/radeon/r600_texture.c

Re: [Mesa-dev] [PATCH 3/4] radeonsi: rework RB+ for Stoney

2016-01-29 Thread Nicolai Hähnle
Patches 1-3: Reviewed-by: Nicolai Hähnle On 29.01.2016 15:02, Marek Olšák wrote: From: Marek Olšák This fixes it. States which also need to be taken into account: - SPI color formats - each down-conversion format supports only a limited set

Re: [Mesa-dev] [PATCH 09/12] nir: Add lowering support for packing opcodes.

2016-01-29 Thread Jason Ekstrand
On Jan 29, 2016 8:44 AM, "Iago Toral" wrote: > > On Thu, 2016-01-28 at 09:21 -0800, Matt Turner wrote: > > On Thu, Jan 28, 2016 at 12:32 AM, Iago Toral wrote: > > > On Mon, 2016-01-25 at 15:18 -0800, Matt Turner wrote: > (...) > > >> diff --git

Re: [Mesa-dev] [PATCH] egl/wayland: Set __DRI_IMAGE_USE_SCANOUT for shared buffers

2016-01-29 Thread Daniel Stone
On 29 January 2016 at 03:44, Michel Dänzer wrote: > It still sounds like significant work (particularly for somebody like me > who isn't very familiar with Wayland details yet). It should be done by > somebody who cares about the difference you're describing. I think it's >

[Mesa-dev] [PATCH 12/45] st/nine: Don't increment refcount on VertexDeclaration creation failure

2016-01-29 Thread Axel Davy
From: Patrick Rudolph NineUnknown_ctor increments the refcount even in case of an error. Restructure the code to prevent refcount increments. Fixes a couple of wine tests. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy ---

[Mesa-dev] [PATCH 02/45] st/nine: Fix D3DPMISCCAPS_FOGANDSPECULARALPHA support

2016-01-29 Thread Axel Davy
The documentation of the flag doesn't make sense. To sum up the doc, if not set, specular alpha contains fog, and if set specular alpha contains 0 (except for ff). However in practice when the flag is there, apps do use specular alpha as if it could be used normally, which makes much more sense

[Mesa-dev] [PATCH 03/45] st/nine: Fix rounding issue with vs1.1 a0 reg

2016-01-29 Thread Axel Davy
vs1.1 rounds a0 to lowest integer, while other versions do round to closest. To use the same path as the other versions (with ARR), we were substracting 0.5 for vs1.1 to get round to lowest. This gives wrong result if a0 is set to 0: round(0 - 0.5) = -1 Instead just use ARL for vs1.1

[Mesa-dev] [PATCH 43/45] st/nine: Enforce centroid for color input when multisampling is on

2016-01-29 Thread Axel Davy
The color inputs must automatically use centroid whether multisampling is used or not. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph --- src/gallium/state_trackers/nine/nine_shader.c | 12 src/gallium/state_trackers/nine/nine_shader.h

[Mesa-dev] [PATCH 45/45] st/nine: Use align_free when needed

2016-01-29 Thread Axel Davy
Use align_free to free memory allocated with align_malloc. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph --- src/gallium/state_trackers/nine/cubetexture9.c | 2 +- src/gallium/state_trackers/nine/surface9.c | 2 +-

Re: [Mesa-dev] [PATCH 19/45] st/nine: Clear rendertarget on creation

2016-01-29 Thread Ilia Mirkin
Pretty sure this isn't an issue for you since DX9 didn't have render conditions (right?) but clear_render_target is documented to respect the render condition. Assuming you never set a render condition this is all good. -ilia On Fri, Jan 29, 2016 at 11:08 AM, Axel Davy

[Mesa-dev] [PATCH 29/45] st/nine: Test more presentation params

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Return errors in case of invalid presentation parameters. Fixes failing WINE tests device.c test_swapchain_parameters(). Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy ---

[Mesa-dev] [PATCH 38/45] st/nine: Add Render state validation layer

2016-01-29 Thread Axel Davy
Testing Win behaviour seems to show wrong states are accepted, but then depending on the states some specific 'good' behaviours happen. This adds some validation to catch invalid states and have these 'good' behaviours when it happens. Also reorders SetRenderState to match the expected

[Mesa-dev] [PATCH 27/45] st/nine: Print GUID instead of pointer

2016-01-29 Thread Axel Davy
From: Patrick Rudolph To ease debugging print the GUID instead of the pointer to it. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/guid.c | 18 ++

[Mesa-dev] [PATCH 16/45] st/nine: Catch redundant SetStreamSourceFreq calls

2016-01-29 Thread Axel Davy
Some apps do redundant SetStreamSourceFreq calls. Catch them to improve performance. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph --- src/gallium/state_trackers/nine/device9.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[Mesa-dev] [PATCH 35/45] st/nine: Handle Window Occlusion

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Apps can know if the window is occluded by checking for specific error messages. The behaviour is different for Device9 and Device9Ex. This allow games to release the mouse and stop rendering until the focus is restored. In case of multiple swapchain

[Mesa-dev] [PATCH 20/45] st/nine: Fix shade mode flat

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Shade mode flat is only working if pixelshaders have interpolate set to TGSI_INTERPOLATE_COLOR on color inputs. Fixes failing WINE tests visual.c test_shademode(). Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy

[Mesa-dev] [PATCH 19/45] st/nine: Clear rendertarget on creation

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Clear every rendertarget on creation. Fixes https://github.com/iXit/Mesa-3D/issues/139 Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/surface9.c | 9 + 1 file

[Mesa-dev] [PATCH 30/45] st/nine: Fix possible crash on error

2016-01-29 Thread Axel Davy
From: Patrick Rudolph In case swapchain creation fails This->swapchains[i] might be NULL and causes a crash. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 3 ++- 1 file changed,

[Mesa-dev] [PATCH 21/45] st/nine: Use cso for viewport

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Use CSO to catch redundant viewport changes. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/nine_state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[Mesa-dev] [PATCH 26/45] st/nine: Fix use of uninitialized memory

2016-01-29 Thread Axel Davy
From: Patrick Rudolph The values of box.z and box.depth weren't set and lead to a crash. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/auxiliary/util/u_box.h | 12

[Mesa-dev] [PATCH 34/45] st/nine: Store minor version num

2016-01-29 Thread Axel Davy
From: Patrick Rudolph To keep compatible with older ID3DPresent interfaces (used to talk with Wine), store the minor version num accessible to all statetracker functions (in the NineDevice9 structure). Signed-off-by: Patrick Rudolph Reviewed-by: Axel

[Mesa-dev] [PATCH 41/45] st/nine: Use fast clears more often for MRTs

2016-01-29 Thread Axel Davy
This enables to use fast clears in the following case: pixel shader renders to 1 RT 4 RT bound clear new pixel shader bound that renders to 4 RTs Previously the fast clear path wouldn't be hit, because when trying the fast clear path, the framebuffer state would be configured for 1 RT, instead

[Mesa-dev] [PATCH 17/45] st/nine: Introduce STREAMFREQ state

2016-01-29 Thread Axel Davy
Previous vertex elements code update was protected by 'if ((group & (NINE_STATE_VDECL | NINE_STATE_VS)) || state->changed.stream_freq & ~1)' itself protected by 'if (group & (NINE_STATE_COMMON | NINE_STATE_VS))' If no state is changed except the stream frequency, no update would happen. This

[Mesa-dev] [PATCH 22/45] st/nine: Support D3DFMT_R8G8B8

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Add support for D3DFMT_R8G8B8. It allows format conversion for surfaces of pool scratch. Usually gallium formats equivalents for d3d9 formats have their names reversed. The gallium format PIPE_FORMAT_R8G8B8_UNORM is the right equivalent here, and its

[Mesa-dev] [PATCH 06/45] st/nine: Fix ff calculation of midVec

2016-01-29 Thread Axel Davy
From: Patrick Rudolph In case of non local viewer the value has to be subtracted. Fixes failing WINE tests in test_specular_lighting() (visual.c) Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy ---

[Mesa-dev] [PATCH 28/45] st/nine: Fix resource9 private data

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Store a copy of GUID in the header that is under our control and use it as key for the hashtable instead of using the application provided pointer. The application might change the memory after leaving the function. Fixes a crash for issue

[Mesa-dev] [PATCH 32/45] st/nine: Fix remaining swapchain tests

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Return D3DERR_INVALIDCALL instead of E_POINTER. On error set ppBackBuffer to NULL. Multiple swapchains can only be created in windowed mode as windowed swapchain. Set backbuffer to NULL in NineDevice9_GetBackBuffer, but not in

[Mesa-dev] [PATCH 24/45] st/nine: Fix Volumetexture9_LockBox

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Check for valid locked box dimensions. Fixes failing wine tests device.c test_lockbox_invalid. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/volume9.c | 7 +++ 1

[Mesa-dev] [PATCH 40/45] st/nine: Use linear filtering for shadow mapping

2016-01-29 Thread Axel Davy
Some docs say linear filtering is always used when app does shadow mapping. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph --- src/gallium/state_trackers/nine/nine_pipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 23/45] st/nine: Fix ATI2 pitch for non-square

2016-01-29 Thread Axel Davy
Fixes crash for non-square textures. We were using the height instead of the width for some calculations. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph --- src/gallium/state_trackers/nine/surface9.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Mesa-dev] [PATCH 18/45] st/nine: Allow ColorFill on D3DFMT_NULL surfaces

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Report success instead of failing as there's no resource for those surfaces. Fixes a crash in Crysis: Warhead. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c |

[Mesa-dev] [PATCH 10/45] st/nine: Initialize lights in stateblocks

2016-01-29 Thread Axel Davy
This fixes a crash. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph --- src/gallium/state_trackers/nine/stateblock9.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/nine/stateblock9.c

[Mesa-dev] [PATCH 33/45] st/nine: Call flush_resource before flush

2016-01-29 Thread Axel Davy
flush_resource needs to be called before flush (for fast clear resolve, etc). Removes useless computation of resource (it is already set correctly). Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph --- src/gallium/state_trackers/nine/swapchain9.c |

[Mesa-dev] [PATCH 44/45] st/nine: Disallow non-argb8888 cursors

2016-01-29 Thread Axel Davy
Only argb cursors are allowed. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph --- src/gallium/state_trackers/nine/device9.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/state_trackers/nine/device9.c

[Mesa-dev] [PATCH 13/45] st/nine: Use ff vertex shader when position_t is used

2016-01-29 Thread Axel Davy
When an application sets a vertex shader, we are supposed to use it, and when no vertex shader are set, we are supposed to revert to fixed function vertex shader. It seems there is an exception: when the vertex declaration has a position_t index, we should revert to fixed function vertex shader.

[Mesa-dev] [PATCH 07/45] st/nine: Replace r[0] with tmp

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Replace r[0] with tmp to ease code reading. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/nine_ff.c | 28 ++-- 1 file changed, 14 insertions(+),

[Mesa-dev] [PATCH 09/45] st/nine: Fix fixed-function blendweights

2016-01-29 Thread Axel Davy
From: Patrick Rudolph The last weighted element is one minus the sum of all previous weights. Fixes WINE test visual.c test_vertex_blending. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy ---

[Mesa-dev] [PATCH 25/45] st/nine: Fix clear for multisample mismatch depth-stencil

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Tests show in case of multisample mismatch between the depth-stencil buffer and the render target, then it is not cleared. Fixes failing WINE test visual.c test_multisample_mismatch(). Signed-off-by: Patrick Rudolph Reviewed-by:

[Mesa-dev] [PATCH 14/45] st/nine: Unset vtxbuf on reset

2016-01-29 Thread Axel Davy
We forgot to reset vtxbuf. This fixes some crashes. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph --- src/gallium/state_trackers/nine/nine_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 36/45] st/nine: Implement NineDevice9_GetAvailableTextureMem

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Implement a device private memory counter similar to Win 7. Only textures and surfaces increment vidmem and may return ERR_OUTOFVIDEOMEMORY. Vertexbuffers and indexbuffers creation always succeedes, even when out of video memory. Fixes "Vampire: The

[Mesa-dev] [PATCH 42/45] st/nine: Fix centroid flag

2016-01-29 Thread Axel Davy
sem.reg.mod & NINED3DSPDM_CENTROID is worth 4 when centroid is requested, whereas TGSI_INTERPOLATE_LOC_CENTROID is worth 1. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_shader.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 37/45] DRI_CONFIG: Add option to override vendor id

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Add config option override_vendorid to report a fake card in d3dadapter9 drm. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/targets/d3dadapter9/drm.c | 61

[Mesa-dev] [PATCH 11/45] st/nine: Change StretchRect check order

2016-01-29 Thread Axel Davy
Textures in SYSTEMMEM don't have resources attached. Instead of returning an error for them, StretchRect was crashing. This changes the check order to fix that case. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph ---

[Mesa-dev] [PATCH 31/45] st/nine: Fix crash NineDevice9_CreateAdditionalSwapChain

2016-01-29 Thread Axel Davy
When no window is specified, we should revert to the focus window. This deserves more tests however (what if the device swapchain is already using the focus window ?) Fixes crash for FFXIV Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph ---

[Mesa-dev] [PATCH 08/45] st/nine: Always normalize hitDir

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/nine_ff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 15/45] st/nine: Squash indexbuffer9 and vertexbuffer9

2016-01-29 Thread Axel Davy
From: Patrick Rudolph The indexbuffer9 codebase was lagging behind the one of vertexbuffer9. Add buffer9 as common code base for indexbuffer9 and vertexbuffer9. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy ---

[Mesa-dev] [PATCH 39/45] st/nine: Respect block alignment on surface lock

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Respect block alignment for ATI1/ATI2 format when trying to lock a surface using LockRect(). Fixes failing WINE tests device.c test_surface_blocks() tests. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy ---

[Mesa-dev] [PATCH 00/45] New Gallium Nine fixes

2016-01-29 Thread Axel Davy
It has been quite some time since the last series. These new patches are more interesting than the ones of last time. Among the fixes and improvements: . Some menu now displaying properly . Games correctly stop rendering when alt-tab . Some Crash fixes . Some games that didn't start now do .

[Mesa-dev] [PATCH 05/45] st/nine: Implement D3DRS_SPECULARENABLE

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Implement fixed function D3DRS_SPECULARENABLE. Fixes failing WINE tests in test_specular_lighting() (visual.c) Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/nine_ff.c |

[Mesa-dev] [PATCH 01/45] st/nine: Fix AlphaCmpCaps

2016-01-29 Thread Axel Davy
From: Patrick Rudolph AlphaCmpCaps should advertise D3DPCMPCAPS_NEVER as well. Fixes https://github.com/iXit/Mesa-3D/issues/142 Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/adapter9.c | 3

[Mesa-dev] [PATCH 04/45] st/nine: Fix D3DRS_LOCALVIEWER being ignored

2016-01-29 Thread Axel Davy
From: Patrick Rudolph Set key->localviewer to D3DRS_LOCALVIEWER. Signed-off-by: Patrick Rudolph Reviewed-by: Axel Davy --- src/gallium/state_trackers/nine/nine_ff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [Mesa-dev] [PATCH 00/45] New Gallium Nine fixes

2016-01-29 Thread Ilia Mirkin
FWIW I looked over these quickly and sent a very small amount of feedback. I didn't really see anything too objectionable, but I'm also not an expert on any of this stuff. On Fri, Jan 29, 2016 at 11:08 AM, Axel Davy wrote: > It has been quite some time since the last series. >

Re: [Mesa-dev] [PATCH 14/45] st/nine: Unset vtxbuf on reset

2016-01-29 Thread Ilia Mirkin
On Fri, Jan 29, 2016 at 11:08 AM, Axel Davy wrote: > We forgot to reset vtxbuf. > This fixes some crashes. > > Signed-off-by: Axel Davy > Reviewed-by: Patrick Rudolph > --- > src/gallium/state_trackers/nine/nine_state.c | 4 +++- > 1 file

[Mesa-dev] glsl_to_tgsi error in register renumbering or merging?

2016-01-29 Thread Ilia Mirkin
Hello, I've been looking at removing some of the optimization passes ahead of nouveau's codegen, and noticed a huge increase in instructions for some shaders. Upon further investigation, I think there's an error in the renumbering pass, which causes a bunch of values to be overwritten and thus

[Mesa-dev] [PATCH] winsys/radeon: Do not deinit the pb cache if it was not initialized

2016-01-29 Thread Niels Ole Salscheider
This fixes a crash in pb_cache_release_all_buffers. Signed-off-by: Niels Ole Salscheider --- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 2/5] egl: Add EGL_RECORDABLE_ANDROID attribute

2016-01-29 Thread Ilia Mirkin
On Fri, Jan 29, 2016 at 5:18 PM, Rob Herring wrote: > On Fri, Jan 29, 2016 at 3:46 PM, Ilia Mirkin wrote: >> On Fri, Jan 29, 2016 at 4:41 PM, Rob Herring wrote: >>> On Fri, Jan 29, 2016 at 3:05 PM, Ilia Mirkin wrote:

Re: [Mesa-dev] [PATCH 3/3] r600g: add support for PK2H/UP2H

2016-01-29 Thread Ilia Mirkin
IIRC this needed to be updated for the new versions of those opcode specs -- they now replicate(ish). Maybe Glenn had sent a better version? On Fri, Jan 29, 2016 at 6:46 PM, Marek Olšák wrote: > From: Ilia Mirkin > > Signed-off-by: Ilia Mirkin

[Mesa-dev] [PATCH 1/2] virgl: reuse screen when fd is already open

2016-01-29 Thread Rob Herring
It is necessary to share the screen between mesa and gralloc to properly ref count resources. This implements a hash lookup on the file description to re-use an already created screen. This is a similar implementation as freedreno and radeon. Signed-off-by: Rob Herring ---

[Mesa-dev] [PATCH 0/2] virgl: allow pipe screen sharing and fix prime fd refcounting

2016-01-29 Thread Rob Herring
Dave, These 2 patches (along with kernel side changes I sent) fix the main problem I've encountered using virgl with Android. There are 2 interrelated problems with ref counting of resources. Gralloc and openGL need to share the pipe screen to properly ref count resources. Furthermore, flink

[Mesa-dev] [PATCH 2/2] virgl: fix reference counting of prime handles

2016-01-29 Thread Rob Herring
The virgl reference counting of buffers is broken for prime fd buffers. Each prime fd passed into virgl_drm_winsys_resource_create_handle creates a new resource. The solution requires creating a separate hash table to track flink names separately from prime handles. Signed-off-by: Rob Herring

[Mesa-dev] [PATCH 1/3] gallivm: don't crash on UP2H and set correct src type

2016-01-29 Thread Marek Olšák
From: Marek Olšák --- src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 1 - src/gallium/auxiliary/tgsi/tgsi_info.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c

[Mesa-dev] [PATCH 3/3] r600g: add support for PK2H/UP2H

2016-01-29 Thread Marek Olšák
From: Ilia Mirkin Signed-off-by: Ilia Mirkin --- src/gallium/drivers/r600/r600_shader.c | 102 +++-- 1 file changed, 98 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/r600/r600_shader.c

[Mesa-dev] [PATCH 2/3] radeonsi: implement PK2H and UP2H opcodes

2016-01-29 Thread Marek Olšák
From: Marek Olšák Based on a gallivm patch by Ilia Mirkin. +8 piglit regressions due to precision issues --- .../drivers/radeon/radeon_setup_tgsi_llvm.c| 72 ++ src/gallium/drivers/radeonsi/si_pipe.c | 2 +- 2 files changed, 73

Re: [Mesa-dev] [PATCH] glsl: disable varying packing when its not safe

2016-01-29 Thread Timothy Arceri
On Fri, 2016-01-29 at 13:14 -0800, Nanley Chery wrote: > On Fri, Jan 29, 2016 at 04:52:54PM +1100, Timothy Arceri wrote: > > In GLES 3.1+ and GL 4.4+ there is no guarantee that interpolation > > qualifiers will match between stages so we cannot safely pack > > varyings using the current packing

[Mesa-dev] [PATCH] nv50/ir: get rid of memory stores with nop values

2016-01-29 Thread Ilia Mirkin
This happens especially with exports and varying packing, where the last bits aren't always filled in. We end up trying to do quad-wide stores, which ends up being a lot of register moves that carefully preserve the nop value. Instead don't do the stores. total instructions in shared programs :

[Mesa-dev] [PATCH] glsl: remove unrequired forward declaration

2016-01-29 Thread Timothy Arceri
This was added in 2548092ad80156a4 although I don't see why as it was already in the linker.h header. --- src/compiler/glsl/linker.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 7f41a4e..73a4b6a 100644 ---

Re: [Mesa-dev] [PATCH 2/5] egl: Add EGL_RECORDABLE_ANDROID attribute

2016-01-29 Thread Rob Herring
On Fri, Jan 29, 2016 at 3:46 PM, Ilia Mirkin wrote: > On Fri, Jan 29, 2016 at 4:41 PM, Rob Herring wrote: >> On Fri, Jan 29, 2016 at 3:05 PM, Ilia Mirkin wrote: >>> Both for this and the previous patch, should we start advertising the

Re: [Mesa-dev] [RFCv2 00/13] gallium: add support for NIR as alternate IR

2016-01-29 Thread Rob Clark
On Thu, Jan 28, 2016 at 5:24 PM, Rob Clark wrote: > fyi, I'm getting rather close to having a v3 of this patchset ready to > send. Since the last version, I've implemented NIR versions of > tgsi_emulate, and bitmap/drawpix lowering, moved a bunch of stuff out > of

Re: [Mesa-dev] [PATCH 3/3] r600g: add support for PK2H/UP2H

2016-01-29 Thread Marek Olšák
On Sat, Jan 30, 2016 at 12:54 AM, Ilia Mirkin wrote: > IIRC this needed to be updated for the new versions of those opcode > specs -- they now replicate(ish). Maybe Glenn had sent a better > version? Yeah, I guess so. I'll drop this patch. Thanks, Marek

Re: [Mesa-dev] [PATCH 2/5] egl: Add EGL_RECORDABLE_ANDROID attribute

2016-01-29 Thread Rob Herring
On Fri, Jan 29, 2016 at 3:05 PM, Ilia Mirkin wrote: > Both for this and the previous patch, should we start advertising the > relevant EGL extensions as well? Or would that take more effort than > just not returning errors for them? That is what patch 5 does. It seems to

[Mesa-dev] [PATCH 2/3] glsl: simplify required stages for linking rules

2016-01-29 Thread Timothy Arceri
This just moves the rules inside an if (!prog->SeparateShader) --- src/compiler/glsl/linker.cpp | 84 +--- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index f2e9889..5cd613d

[Mesa-dev] [PATCH 1/3] glsl: small tidy up now that link_shaders() exits early with 0 shaders

2016-01-29 Thread Timothy Arceri
--- This applies on top of: http://patchwork.freedesktop.org/patch/71619/ src/compiler/glsl/linker.cpp | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 80af2b3..f2e9889 100644 ---

[Mesa-dev] [PATCH 3/3] glsl: simplify ES Vertex/Fragment shader requirements

2016-01-29 Thread Timothy Arceri
We really just needed to skip the existing ES < 3.1 check if we have a compute shader, all other scenarios are already covered. * No shaders is a link error. * Geom or Tess without Vertex is a link error which means we always require a Vertex shader and hence a Fragment shader. * Finally a

Re: [Mesa-dev] [PATCH 2/5] egl: Add EGL_RECORDABLE_ANDROID attribute

2016-01-29 Thread Ilia Mirkin
On Fri, Jan 29, 2016 at 4:41 PM, Rob Herring wrote: > On Fri, Jan 29, 2016 at 3:05 PM, Ilia Mirkin wrote: >> Both for this and the previous patch, should we start advertising the >> relevant EGL extensions as well? Or would that take more effort than >>

[Mesa-dev] [PATCH 6/6] virgl: also build vtest for Android

2016-01-29 Thread Rob Herring
Enabling swrast on Android causes a link error because vtest is missing. Signed-off-by: Rob Herring --- src/gallium/Android.mk| 2 +- src/gallium/targets/dri/Android.mk| 2 +- src/gallium/winsys/virgl/vtest/Android.mk | 33

Re: [Mesa-dev] [PATCH 00/45] New Gallium Nine fixes

2016-01-29 Thread Axel Davy
Thanks a lot ! On 29/01/2016 17:59, Ilia Mirkin wrote: FWIW I looked over these quickly and sent a very small amount of feedback. I didn't really see anything too objectionable, but I'm also not an expert on any of this stuff. On Fri, Jan 29, 2016 at 11:08 AM, Axel Davy

Re: [Mesa-dev] [PATCH 19/45] st/nine: Clear rendertarget on creation

2016-01-29 Thread Axel Davy
Yes, we don't use render conditions. On 29/01/2016 17:46, Ilia Mirkin wrote: Pretty sure this isn't an issue for you since DX9 didn't have render conditions (right?) but clear_render_target is documented to respect the render condition. Assuming you never set a render condition this is all

[Mesa-dev] [PATCH 3/6] Android: Fix building secondary arch in mixed 32/64-bit builds

2016-01-29 Thread Rob Herring
At least in Android M, using LOCAL_CC does not work for secondary arch when doing dual arch builds. Use LOCAL_CLFAGS and LOCAL_CONLYFLAGS instead. Cc: Emil Velikov Cc: Chih-Wei Huang Signed-off-by: Rob Herring ---

[Mesa-dev] [PATCH 4/6] Android: enable building on arm64

2016-01-29 Thread Rob Herring
Define the DEFAULT_DRIVER_DIR for arm64 builds. Cc: Emil Velikov Cc: Chih-Wei Huang Signed-off-by: Rob Herring --- src/egl/Android.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/egl/Android.mk b/src/egl/Android.mk

[Mesa-dev] [PATCH 1/6] Android: fix build break from nir/glsl move to compiler/

2016-01-29 Thread Rob Herring
Commits a39a8fbbaa12 ("nir: move to compiler/") and eb63640c1d38 ("glsl: move to compiler/") broke Android builds. Fix them. Built with i915, i965, freedreno, r300g, r600g, and virgl enabled. Cc: Emil Velikov Signed-off-by: Rob Herring ---

[Mesa-dev] [PATCH 5/6] Android: disable unused-parameter warning

2016-01-29 Thread Rob Herring
Android builds with -Wunused-parameter enabled which results in spewing lots of warnings. Disable it so more meaningful warnings are more visible. Signed-off-by: Rob Herring --- Android.common.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/Android.common.mk

[Mesa-dev] [PATCH 2/6] Android: fix x86 gallium builds

2016-01-29 Thread Rob Herring
Builds with gallium enabled fail on x86 with linker error: external/mesa3d/src/mesa/vbo/vbo_exec_array.c:127: error: undefined reference to '_mesa_uint_array_min_max' Fix this by adding the missing file sse_minmax.c. Signed-off-by: Rob Herring ---

Re: [Mesa-dev] [PATCH 4/4] radeonsi: fix Hyper-Z on Stoney

2016-01-29 Thread Marek Olšák
On Fri, Jan 29, 2016 at 4:15 PM, Nicolai Hähnle wrote: > On 29.01.2016 15:02, Marek Olšák wrote: >> >> From: Marek Olšák >> >> Cc: 10.0 10.1 > > > "11.0 11.1" > > >> --- >> src/gallium/drivers/radeon/r600_texture.c |

Re: [Mesa-dev] [PATCH 14/45] st/nine: Unset vtxbuf on reset

2016-01-29 Thread Axel Davy
On 29/01/2016 17:49, Ilia Mirkin wrote: On Fri, Jan 29, 2016 at 11:08 AM, Axel Davy wrote: We forgot to reset vtxbuf. This fixes some crashes. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph ---

Re: [Mesa-dev] glsl_to_tgsi error in register renumbering or merging?

2016-01-29 Thread Ilia Mirkin
This appears to be a shortcoming that expects DCE to do a bunch of work :( It doesn't treat a write as a read, so the live range is determined by (first_write, last_read). So if there's a write without a later read, it won't count that as part of its live range. (And indeed turning DCE back on

[Mesa-dev] [PATCH 2/5] egl: Add EGL_RECORDABLE_ANDROID attribute

2016-01-29 Thread Rob Herring
This is a necessary attribute on Android M. Signed-off-by: Rob Herring --- src/egl/main/eglconfig.c | 4 +++- src/egl/main/eglconfig.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index

[Mesa-dev] [PATCH 1/5] egl: Add EGL_FRAMEBUFFER_TARGET_ANDROID attribute

2016-01-29 Thread Rob Herring
This is a necessary attribute on Android M. Signed-off-by: Rob Herring --- src/egl/main/eglconfig.c | 5 - src/egl/main/eglconfig.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c index

[Mesa-dev] [PATCH 3/5] egl: android: fix visuals declaration

2016-01-29 Thread Rob Herring
From: Varad Gautam Signed-off-by: Varad Gautam --- src/egl/drivers/dri2/platform_android.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index

[Mesa-dev] [PATCH 4/5] egl: android: clean-up config attribute setting

2016-01-29 Thread Rob Herring
Pass the additional config attributes to dri2_add_config to set them instead of open coding them. This is in preparation to add more attributes. Signed-off-by: Rob Herring --- src/egl/drivers/dri2/platform_android.c | 12 +--- 1 file changed, 9 insertions(+), 3

[Mesa-dev] [PATCH 5/5] egl: android: enable EGL_FRAMEBUFFER_TARGET_ANDROID and EGL_RECORDABLE_ANDROID

2016-01-29 Thread Rob Herring
Set EGL_FRAMEBUFFER_TARGET_ANDROID and EGL_RECORDABLE_ANDROID config attributes to true for Android. These are required in Marshmallow. There may be more needed to really support these, but this is enough to get things working. Signed-off-by: Rob Herring ---

[Mesa-dev] [PATCH] st/mesa: treat a write as a read for range purposes

2016-01-29 Thread Ilia Mirkin
We use this logic to detect live ranges and then do plain renaming across the whole codebase. As such, to prevent WaW hazards, we have to treat a write as if it were also a read. For example, the following sequence was observed before this patch: 13: UIF TEMP[6]. :0 14: ADD TEMP[6].x,

Re: [Mesa-dev] [PATCH 2/5] egl: Add EGL_RECORDABLE_ANDROID attribute

2016-01-29 Thread Ilia Mirkin
Both for this and the previous patch, should we start advertising the relevant EGL extensions as well? Or would that take more effort than just not returning errors for them? On Fri, Jan 29, 2016 at 3:51 PM, Rob Herring wrote: > This is a necessary attribute on Android M. > >

Re: [Mesa-dev] [PATCH] glsl: disable varying packing when its not safe

2016-01-29 Thread Nanley Chery
On Fri, Jan 29, 2016 at 04:52:54PM +1100, Timothy Arceri wrote: > In GLES 3.1+ and GL 4.4+ there is no guarantee that interpolation > qualifiers will match between stages so we cannot safely pack > varyings using the current packing pass in Mesa. > > We also disable packing on outward facing SSO

[Mesa-dev] [PATCH 3/7] winsys/amdgpu: add an assertion to cik_get_num_tile_pipes

2016-01-29 Thread Marek Olšák
From: Marek Olšák --- src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index d1ba259..8366f8f 100644 ---

[Mesa-dev] [PATCH 5/7] gallium/radeon: set num_banks in the winsys

2016-01-29 Thread Marek Olšák
From: Marek Olšák amdgpu doesn't have to set this, because radeonsi gets it from tile mode arrays by default. --- src/gallium/drivers/r600/evergreen_state.c| 8 src/gallium/drivers/r600/r600_uvd.c | 2 +-

[Mesa-dev] [PATCH 7/7] gallium/radeon: remove radeon_info::r600_tiling_config

2016-01-29 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeon/r600_pipe_common.c | 3 ++- src/gallium/drivers/radeon/radeon_winsys.h| 1 - src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 15 --- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 16

  1   2   >