mesa.git
8 years agogallium: add a way to store query result into buffer
Ilia Mirkin [Sun, 3 May 2015 00:28:11 +0000 (20:28 -0400)]
gallium: add a way to store query result into buffer

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomesa: add core implementation of ARB_query_buffer_object
Ilia Mirkin [Wed, 6 May 2015 02:58:12 +0000 (22:58 -0400)]
mesa: add core implementation of ARB_query_buffer_object

Forwards query result writes to drivers.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomesa: add driver interface for writing query results to buffers
Ilia Mirkin [Wed, 6 May 2015 02:57:41 +0000 (22:57 -0400)]
mesa: add driver interface for writing query results to buffers

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomesa: Handle QUERY_BUFFER_BINDING in GetIntegerv
Rafal Mielniczuk [Thu, 27 Mar 2014 20:59:05 +0000 (21:59 +0100)]
mesa: Handle QUERY_BUFFER_BINDING in GetIntegerv

Signed-off-by: Rafal Mielniczuk <rafal.mielniczuk2@gmail.com>
[imirkin: move to GL/GL_CORE section]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomesa: Add QueryBuffer to context
Rafal Mielniczuk [Thu, 27 Mar 2014 20:59:04 +0000 (21:59 +0100)]
mesa: Add QueryBuffer to context

Add QueryBuffer and initialise it to NullBufferObj on start

Signed-off-by: Rafal Mielniczuk <rafal.mielniczuk2@gmail.com>
[imirkin: also release QueryBuffer on free]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomesa: Add ARB_query_buffer_object extension flag
Rafal Mielniczuk [Thu, 27 Mar 2014 20:59:03 +0000 (21:59 +0100)]
mesa: Add ARB_query_buffer_object extension flag

Signed-off-by: Rafal Mielniczuk <rafal.mielniczuk2@gmail.com>
[imirkin: add string to extensions.c]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agoglapi: Add xml infrastructure for ARB_query_buffer_object
Rafal Mielniczuk [Thu, 27 Mar 2014 20:59:02 +0000 (21:59 +0100)]
glapi: Add xml infrastructure for ARB_query_buffer_object

Signed-off-by: Rafal Mielniczuk <rafal.mielniczuk2@gmail.com>
[imirkin: move definition to gl_API.xml as it is very short]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agoglsl: simplify setting of image access qualifiers
Timothy Arceri [Thu, 4 Feb 2016 00:08:43 +0000 (11:08 +1100)]
glsl: simplify setting of image access qualifiers

Cc: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
8 years agomesa: remove dead program parameter functions
Timothy Arceri [Thu, 4 Feb 2016 10:50:39 +0000 (21:50 +1100)]
mesa: remove dead program parameter functions

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
8 years agost/nine: Use align_free when needed
Axel Davy [Thu, 28 Jan 2016 21:32:43 +0000 (22:32 +0100)]
st/nine: Use align_free when needed

Use align_free to free memory allocated
with align_malloc.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Disallow non-argb8888 cursors
Axel Davy [Tue, 26 Jan 2016 15:40:30 +0000 (16:40 +0100)]
st/nine: Disallow non-argb8888 cursors

Only argb8888 cursors are allowed.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Enforce centroid for color input when multisampling is on
Axel Davy [Sat, 9 Jan 2016 13:16:15 +0000 (14:16 +0100)]
st/nine: Enforce centroid for color input when multisampling is on

The color inputs must automatically use centroid whether
multisampling is used or not.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Fix centroid flag
Axel Davy [Thu, 28 Jan 2016 21:44:42 +0000 (22:44 +0100)]
st/nine: Fix centroid flag

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 <axel.davy@ens.fr>
8 years agost/nine: Use fast clears more often for MRTs
Axel Davy [Mon, 4 Jan 2016 15:15:18 +0000 (16:15 +0100)]
st/nine: Use fast clears more often for MRTs

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 of 4.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Use linear filtering for shadow mapping
Axel Davy [Mon, 4 Jan 2016 15:13:07 +0000 (16:13 +0100)]
st/nine: Use linear filtering for shadow mapping

Some docs say linear filtering is always used when
app does shadow mapping.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Respect block alignment on surface lock
Patrick Rudolph [Thu, 22 Oct 2015 13:46:16 +0000 (15:46 +0200)]
st/nine: Respect block alignment on surface lock

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 <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Add Render state validation layer
Axel Davy [Sat, 16 May 2015 12:28:41 +0000 (14:28 +0200)]
st/nine: Add Render state validation layer

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
optimisation:
(Value == previous Value) => return immediately,
which affects D3D9 hacks too.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
8 years agoDRI_CONFIG: Add option to override vendor id
Patrick Rudolph [Mon, 25 May 2015 11:06:58 +0000 (13:06 +0200)]
DRI_CONFIG: Add option to override vendor id

Add config option override_vendorid to report a fake card in d3dadapter9 drm.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Implement NineDevice9_GetAvailableTextureMem
Patrick Rudolph [Wed, 30 Sep 2015 14:42:10 +0000 (16:42 +0200)]
st/nine: Implement NineDevice9_GetAvailableTextureMem

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 Masquerade - Bloodlines" allocating resources until crash.
Fixes "Age of Conan" allocating resources until crash.
Fixes failing WINE test device.c test_vidmem_accounting().

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Handle Window Occlusion
Patrick Rudolph [Sat, 20 Jun 2015 18:06:11 +0000 (20:06 +0200)]
st/nine: Handle Window Occlusion

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 we do care only of the device one.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Store minor version num
Patrick Rudolph [Sun, 23 Aug 2015 06:42:34 +0000 (08:42 +0200)]
st/nine: Store minor version num

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 <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Call flush_resource before flush
Axel Davy [Thu, 8 Oct 2015 22:08:43 +0000 (00:08 +0200)]
st/nine: Call flush_resource before flush

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 <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Fix remaining swapchain tests
Patrick Rudolph [Thu, 22 Oct 2015 15:00:35 +0000 (17:00 +0200)]
st/nine: Fix remaining swapchain tests

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 NineSwapChain9_GetBackBuffer.

This fixes all WINE's device.c test_swapchain() tests.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Fix crash NineDevice9_CreateAdditionalSwapChain
Axel Davy [Wed, 11 Nov 2015 09:13:58 +0000 (10:13 +0100)]
st/nine: Fix crash NineDevice9_CreateAdditionalSwapChain

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 <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Fix possible crash on error
Patrick Rudolph [Thu, 22 Oct 2015 15:02:16 +0000 (17:02 +0200)]
st/nine: Fix possible crash on error

In case swapchain creation fails This->swapchains[i] might be NULL and
causes a crash.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Test more presentation params
Patrick Rudolph [Thu, 22 Oct 2015 14:02:14 +0000 (16:02 +0200)]
st/nine: Test more presentation params

Return errors in case of invalid presentation parameters.
Fixes failing WINE tests device.c test_swapchain_parameters().

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Fix resource9 private data
Patrick Rudolph [Sat, 14 Nov 2015 12:02:43 +0000 (13:02 +0100)]
st/nine: Fix resource9 private data

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 https://github.com/iXit/Mesa-3D/issues/130

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Print GUID instead of pointer
Patrick Rudolph [Sat, 14 Nov 2015 11:59:46 +0000 (12:59 +0100)]
st/nine: Print GUID instead of pointer

To ease debugging print the GUID instead of the pointer to it.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Fix use of uninitialized memory
Patrick Rudolph [Thu, 24 Sep 2015 17:57:51 +0000 (19:57 +0200)]
st/nine: Fix use of uninitialized memory

The values of box.z and box.depth weren't set and lead to a crash.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Fix clear for multisample mismatch depth-stencil
Patrick Rudolph [Wed, 23 Sep 2015 14:30:37 +0000 (16:30 +0200)]
st/nine: Fix clear for multisample mismatch depth-stencil

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 <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Fix Volumetexture9_LockBox
Patrick Rudolph [Mon, 31 Aug 2015 17:17:13 +0000 (19:17 +0200)]
st/nine: Fix Volumetexture9_LockBox

Check for valid locked box dimensions.

Fixes failing wine tests device.c test_lockbox_invalid.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Fix ATI2 pitch for non-square
Axel Davy [Sat, 22 Aug 2015 23:09:44 +0000 (01:09 +0200)]
st/nine: Fix ATI2 pitch for non-square

Fixes crash for non-square textures.
We were using the height instead of the
width for some calculations.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Support D3DFMT_R8G8B8
Patrick Rudolph [Mon, 9 Nov 2015 18:30:13 +0000 (19:30 +0100)]
st/nine: Support D3DFMT_R8G8B8

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 name is likely wrong (reversed).

Fixes a crash in TmNationsForever.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Use cso for viewport
Patrick Rudolph [Sat, 19 Dec 2015 06:43:08 +0000 (07:43 +0100)]
st/nine: Use cso for viewport

Use CSO to catch redundant viewport changes.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Fix shade mode flat
Patrick Rudolph [Sat, 12 Dec 2015 09:22:12 +0000 (10:22 +0100)]
st/nine: Fix shade mode flat

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 <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Clear rendertarget on creation
Patrick Rudolph [Thu, 10 Dec 2015 19:08:03 +0000 (20:08 +0100)]
st/nine: Clear rendertarget on creation

Clear every rendertarget on creation.
Fixes https://github.com/iXit/Mesa-3D/issues/139

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Allow ColorFill on D3DFMT_NULL surfaces
Patrick Rudolph [Sat, 5 Dec 2015 13:14:38 +0000 (14:14 +0100)]
st/nine: Allow ColorFill on D3DFMT_NULL surfaces

Report success instead of failing as there's no resource for those surfaces.
Fixes a crash in Crysis: Warhead.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Introduce STREAMFREQ state
Axel Davy [Sat, 12 Dec 2015 18:20:28 +0000 (19:20 +0100)]
st/nine: Introduce STREAMFREQ state

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 patch solves the problem by adding a new
NINE_STATE_STREAMFREQ state.
Another way would be to add state->changed.stream_freq & ~1
check to the main test.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Catch redundant SetStreamSourceFreq calls
Axel Davy [Sat, 12 Dec 2015 18:11:10 +0000 (19:11 +0100)]
st/nine: Catch redundant SetStreamSourceFreq calls

Some apps do redundant SetStreamSourceFreq calls.
Catch them to improve performance.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Squash indexbuffer9 and vertexbuffer9
Patrick Rudolph [Sun, 15 Nov 2015 10:26:25 +0000 (11:26 +0100)]
st/nine: Squash indexbuffer9 and vertexbuffer9

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 <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Unset vtxbuf on reset
Axel Davy [Sun, 15 Nov 2015 16:10:40 +0000 (17:10 +0100)]
st/nine: Unset vtxbuf on reset

We forgot to reset vtxbuf.
This fixes some crashes.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Use pipe_resource_reference for vtxbuf
Axel Davy [Sat, 30 Jan 2016 10:39:21 +0000 (11:39 +0100)]
st/nine: Use pipe_resource_reference for vtxbuf

This seems cleaner to actually reference the resources for vtxbuf,
rather than relying on the fact the bound d3d streams do.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Use ff vertex shader when position_t is used
Axel Davy [Sat, 7 Nov 2015 16:47:06 +0000 (17:47 +0100)]
st/nine: Use ff vertex shader when position_t is used

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.

Up to know we were checking if device->state.vs is set
to know whether to use programmable shader or not.

With this commit we determine whether we use programmable shader
or not when vertex shader/declaration are set, but
stateblocks do complicate things a bit.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Don't increment refcount on VertexDeclaration creation failure
Patrick Rudolph [Thu, 28 May 2015 18:45:01 +0000 (20:45 +0200)]
st/nine: Don't increment refcount on VertexDeclaration creation failure

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 <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Change StretchRect check order
Axel Davy [Mon, 24 Aug 2015 17:36:55 +0000 (19:36 +0200)]
st/nine: Change StretchRect check order

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 <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Initialize lights in stateblocks
Axel Davy [Sun, 16 Aug 2015 19:39:42 +0000 (21:39 +0200)]
st/nine: Initialize lights in stateblocks

This fixes a crash.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Fix fixed-function blendweights
Patrick Rudolph [Tue, 22 Sep 2015 14:10:40 +0000 (16:10 +0200)]
st/nine: Fix fixed-function blendweights

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 <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Always normalize hitDir
Patrick Rudolph [Tue, 22 Sep 2015 12:30:35 +0000 (14:30 +0200)]
st/nine: Always normalize hitDir

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Replace r[0] with tmp
Patrick Rudolph [Tue, 22 Sep 2015 11:24:08 +0000 (13:24 +0200)]
st/nine: Replace r[0] with tmp

Replace r[0] with tmp to ease code reading.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Fix ff calculation of midVec
Patrick Rudolph [Mon, 28 Sep 2015 17:44:26 +0000 (19:44 +0200)]
st/nine: Fix ff calculation of midVec

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 <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Implement D3DRS_SPECULARENABLE
Patrick Rudolph [Tue, 22 Sep 2015 10:57:37 +0000 (12:57 +0200)]
st/nine: Implement D3DRS_SPECULARENABLE

Implement fixed function D3DRS_SPECULARENABLE.
Fixes failing WINE tests in test_specular_lighting() (visual.c)

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Fix D3DRS_LOCALVIEWER being ignored
Patrick Rudolph [Tue, 22 Sep 2015 15:29:42 +0000 (17:29 +0200)]
st/nine: Fix D3DRS_LOCALVIEWER being ignored

Set key->localviewer to D3DRS_LOCALVIEWER.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agost/nine: Fix rounding issue with vs1.1 a0 reg
Axel Davy [Wed, 11 Nov 2015 09:15:19 +0000 (10:15 +0100)]
st/nine: Fix rounding issue with vs1.1 a0 reg

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

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Fix D3DPMISCCAPS_FOGANDSPECULARALPHA support
Axel Davy [Sat, 17 Oct 2015 11:54:18 +0000 (13:54 +0200)]
st/nine: Fix D3DPMISCCAPS_FOGANDSPECULARALPHA support

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 than the doc.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
8 years agost/nine: Fix AlphaCmpCaps
Patrick Rudolph [Thu, 24 Dec 2015 10:32:37 +0000 (11:32 +0100)]
st/nine: Fix AlphaCmpCaps

AlphaCmpCaps should advertise D3DPCMPCAPS_NEVER as well.

Fixes https://github.com/iXit/Mesa-3D/issues/142

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
8 years agoradeonsi: implement PK2H and UP2H opcodes
Marek Olšák [Fri, 29 Jan 2016 23:30:02 +0000 (00:30 +0100)]
radeonsi: implement PK2H and UP2H opcodes

Based on a gallivm patch by Ilia Mirkin.

+8 piglit regressions due to precision issues (I blame the tests)

The benefit is that we'll get v_cvt_f32_f16 and v_cvt_f16_f32 instead
of emulation with integer instructions. They are GLSL 4.00 intrinsics.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agoglsl: Ensure glsl/ exists before making the lexer/parser.
Matt Turner [Wed, 3 Feb 2016 20:03:13 +0000 (12:03 -0800)]
glsl: Ensure glsl/ exists before making the lexer/parser.

Reported-by: Jan Ziak <0xe2.0x9a.0x9b@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93989

8 years agoi965/fs: Allocate single register at a time for constants.
Matt Turner [Mon, 1 Feb 2016 19:14:01 +0000 (11:14 -0800)]
i965/fs: Allocate single register at a time for constants.

No instruction counts changed, but:

  total cycles in shared programs: 64834502 -> 64781530 (-0.08%)
  cycles in affected programs: 16331544 -> 16278572 (-0.32%)
  helped: 4757
  HURT: 4288

  GAINED: 66
  LOST:   20

I remember trying this when I first wrote the pass, but it wasn't
helpful at the time.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
8 years agoradeonsi: fix Hyper-Z on Stoney
Marek Olšák [Thu, 28 Jan 2016 00:35:52 +0000 (01:35 +0100)]
radeonsi: fix Hyper-Z on Stoney

Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agomesa: Use SSE prefetch instructions rather than 3DNow instructions
Patrick Baggett [Wed, 3 Feb 2016 21:05:54 +0000 (08:05 +1100)]
mesa: Use SSE prefetch instructions rather than 3DNow instructions

64-bit Pentium 4 CPUs don't have the 3DNow prefetch instructions
which results in an Illegal instruction crash.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Tested-by: Timothy Arceri <t_arceri@yahoo.com.au>
https://bugs.freedesktop.org/show_bug.cgi?id=27512

8 years agonv50/ir: make sure to fetch all sources before creating instruction
Ilia Mirkin [Wed, 3 Feb 2016 23:16:04 +0000 (18:16 -0500)]
nv50/ir: make sure to fetch all sources before creating instruction

We must fetch all sources into the instruction stream before generating
the instruction that uses them. Otherwise we'll define values after
using them, which won't work so well.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
8 years agonv50: avoid freeing the symbols if they're about to be stored
Ilia Mirkin [Wed, 3 Feb 2016 18:52:26 +0000 (13:52 -0500)]
nv50: avoid freeing the symbols if they're about to be stored

Spotted by Coverity

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
8 years agost/mesa: fix potential null deref if no shader is passed in
Ilia Mirkin [Wed, 3 Feb 2016 18:51:19 +0000 (13:51 -0500)]
st/mesa: fix potential null deref if no shader is passed in

Spotted by Coverity

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
8 years agoglx: update to updated version of EXT_create_context_es2_profile
Ilia Mirkin [Tue, 19 Jan 2016 15:07:04 +0000 (10:07 -0500)]
glx: update to updated version of EXT_create_context_es2_profile

The EXT spec has been updated to:
 - logically combine the es2_profile and es_profile exts
 - allow any legal version to be requested

dEQP tests request a specific ES version when using GLX, so this allows
dEQP upstream to run against GLX with the appropriate X server patch
(which had similar disabling logic).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Matt Turner <mattst88@gmail.com> (v1)
Reviewed-by: Adam Jackson <ajax@redhat.com> (v3)
v1 -> v2:
 - distinguish between DRI_API_GLES{,2,3}
 - add GLX_EXT_create_context_es_profile client-side support
v2 -> v3:
 - fix error in computing mask

8 years agodir-locals.el: set case-label offset to 0
Ilia Mirkin [Wed, 3 Feb 2016 18:07:58 +0000 (13:07 -0500)]
dir-locals.el: set case-label offset to 0

While this is the default, private .emacs files might have it set to
something else. No harm in forcing it to 0.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
8 years agoappveyor: Bump shallow clone depth.
Jose Fonseca [Sun, 24 Jan 2016 18:33:58 +0000 (18:33 +0000)]
appveyor: Bump shallow clone depth.

To prevent build failures when a large patch series is committed, like
happened in https://ci.appveyor.com/project/jrfonseca-fdo/mesa/build/322
due to 10 commits between dac2964f3ebd96d5ac227984ab0cd79c2c3b2a1a and
6f428328d34bed16edb8709e4a117eb710d7893d where submitted before the
build slave started the git clone.

100 commits should be bigger than any patch series seen in practice, and
it takes practically the same time to download as 5 commits.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
8 years agoRevert "compiler: removed unused Makefile.sources"
Rob Clark [Wed, 3 Feb 2016 19:35:10 +0000 (14:35 -0500)]
Revert "compiler: removed unused Makefile.sources"

Whoops, didn't mean to push this one.

This reverts commit 78f4c555b93eb0951dcd9c5812109d506dd03023.

8 years agocompiler: fix .gitignore for glsl_compiler
Rob Clark [Wed, 3 Feb 2016 18:32:46 +0000 (13:32 -0500)]
compiler: fix .gitignore for glsl_compiler

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agocompiler: removed unused Makefile.sources
Rob Clark [Sat, 30 Jan 2016 20:04:19 +0000 (15:04 -0500)]
compiler: removed unused Makefile.sources

We seem to end up w/ duplication between compiler/Makefile.sources and
compiler/glsl/Makefile.sources.  The latter appears unused.  Delete it.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agogallium: fix the documentation of PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE
Nicolai Hähnle [Tue, 26 Jan 2016 16:03:11 +0000 (11:03 -0500)]
gallium: fix the documentation of PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE

This parameter is equivalent to the corresponding OpenGL implementation
limit which is in texels, not bytes.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agogallium/radeon: support PIPE_CAP_SURFACE_REINTERPRET_BLOCKS
Nicolai Hähnle [Tue, 26 Jan 2016 15:29:50 +0000 (10:29 -0500)]
gallium/radeon: support PIPE_CAP_SURFACE_REINTERPRET_BLOCKS

This is already used internally in si_resource_copy_region for compressed
textures, so the only real change here is the adjusted surface size
computation.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agost/mesa: implement PBO upload for glCompressedTex(Sub)Image
Nicolai Hähnle [Sat, 16 Jan 2016 01:09:40 +0000 (20:09 -0500)]
st/mesa: implement PBO upload for glCompressedTex(Sub)Image

v2:
- use st->pbo_upload.enabled flag

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agost/mesa: redirect CompressedTexSubImage to our own implementation
Nicolai Hähnle [Fri, 15 Jan 2016 23:24:10 +0000 (18:24 -0500)]
st/mesa: redirect CompressedTexSubImage to our own implementation

This is where PBO upload will go.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agost/mesa: inline the implementation of _mesa_store_compressed_teximage
Nicolai Hähnle [Fri, 15 Jan 2016 23:17:17 +0000 (18:17 -0500)]
st/mesa: inline the implementation of _mesa_store_compressed_teximage

We will write our own version of texsubimage for PBO uploads, and we will
want to call that here as well.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agost/mesa: implement PBO upload for multiple layers
Nicolai Hähnle [Thu, 21 Jan 2016 17:54:54 +0000 (12:54 -0500)]
st/mesa: implement PBO upload for multiple layers

Use instancing to generate two triangles for each destination layer and use
a geometry shader to route the layer index.

v2:
- directly write layer in VS if supported by the driver (Marek Olšák)

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agost/mesa: Accelerate PBO uploads
Fredrik Höglund [Fri, 8 Jan 2016 21:31:14 +0000 (16:31 -0500)]
st/mesa: Accelerate PBO uploads

Create a PIPE_BUFFER sampler view on the pixel-unpack buffer, and draw
the image on the texture with a fragment shader that maps fragment
coordinates to buffer coordinates.

Modifications by Nicolai Hähnle:
- various cleanups and fixes (e.g. error handling, corner cases)
- split try_pbo_upload into two functions, which will allow code to be
  shared with compressed texture uploads
- modify the source format selection to only test for support against
  the PIPE_BUFFER target

v2:
- update handling of TGSI_SEMANTIC_POSITION for recent changes in master
- MaxTextureBufferSize is number of texels, not bytes (Ilia Mirkin)
- only enable when integers are supported (Marek Olšák)
- try harder to hit the TextureBufferOffsetAlignment
- remove unnecessary MOV from the fragment shader

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agost/mesa: use the correct address generation functions in st_TexSubImage blit
Nicolai Hähnle [Sat, 16 Jan 2016 20:15:13 +0000 (15:15 -0500)]
st/mesa: use the correct address generation functions in st_TexSubImage blit

We need to tell the address generation functions about the dimensionality of
the texture to correctly implement the part of Section 3.8.1 (Texture Image
Specification) of the OpenGL 2.1 specification which says:

    "For the purposes of decoding the texture image, TexImage2D is
    equivalent to calling TexImage3D with corresponding arguments
    and depth of 1, except that
      ...
      * UNPACK SKIP IMAGES is ignored."

Fixes a low impact bug that was found by chance while browsing the spec and
extending piglit tests.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agogallium: Add PIPE_CAP_SURFACE_REINTERPRET_BLOCKS
Nicolai Hähnle [Tue, 26 Jan 2016 15:27:58 +0000 (10:27 -0500)]
gallium: Add PIPE_CAP_SURFACE_REINTERPRET_BLOCKS

This cap indicates whether pipe->create_surface can reinterpret a texture
as a surface with a format of different block width/height (but equal
block size).

v2: fix whitespace

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agogallium: Add PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY
Nicolai Hähnle [Tue, 26 Jan 2016 15:26:30 +0000 (10:26 -0500)]
gallium: Add PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY

This cap indicates that the driver only supports R, RG, RGB and RGBA
formats for PIPE_BUFFER sampler views.

v2: move into "unsupported features" section for nouveau (Ilia Mirkin)

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agomesa: add MESA_NO_MINMAX_CACHE environment variable
Nicolai Hähnle [Mon, 11 Jan 2016 20:56:22 +0000 (15:56 -0500)]
mesa: add MESA_NO_MINMAX_CACHE environment variable

When set to a truish value, this globally disables the minmax cache for all
buffer objects.

No #ifdef DEBUG guards because this option can be interesting for
benchmarking.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agovbo: disable the minmax cache when the hit rate is low
Nicolai Hähnle [Mon, 11 Jan 2016 20:07:48 +0000 (15:07 -0500)]
vbo: disable the minmax cache when the hit rate is low

When applications stream their index buffers, the caches for those BOs become
useless and add overhead, so we want to disable them. The tricky part is
coming up with the right heuristic for *when* to disable them.

The first question is which hit rate to aim for. Since I'm not aware of any
interesting borderline applications that do something like "draw two or three
times for each upload", I just kept it simple.

The second question is how soon we should give up on the caching. Applications
might have a warm-up phase where they fill a buffer gradually but then keep
reusing it. For this reason, I count the number of indices that hit and miss
(instead of the number of calls that hit or miss), since comparing that to
the size of the buffer makes sense.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomesa: add USAGE_DISABLE_MINMAX_CACHE flag to buffer UsageHistory
Nicolai Hähnle [Mon, 11 Jan 2016 20:46:39 +0000 (15:46 -0500)]
mesa: add USAGE_DISABLE_MINMAX_CACHE flag to buffer UsageHistory

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agovbo: cache/memoize the result of vbo_get_minmax_indices (v3)
Nicolai Hähnle [Mon, 11 Jan 2016 19:54:53 +0000 (14:54 -0500)]
vbo: cache/memoize the result of vbo_get_minmax_indices (v3)

Some games developers are unaware that an index buffer in a VBO still needs
to be read by the CPU if some varying data comes from a user pointer (unless
glDrawRangeElements and friends are used). This is particularly bad when
they tell us that the index buffer should live in VRAM.

This cache helps, e.g. lifting This War Of Mine (a particularly bad
offender) from under 10fps to slightly over 20fps on a Carrizo.

Note that there is nothing prohibiting a user from rendering from multiple
threads simultaneously with the same index buffer, hence the locking. (The
internal buffer map taken for the buffer still leads to a race, but at least
the locks are a move in the right direction.)

v2: disable the cache on USAGE_TEXTURE_BUFFER as well (Chris Forbes)

v3:
- use bool instead of GLboolean for MinMaxCacheDirty (Ian Romanick)
- replace the sticky USAGE_PERSISTENT_WRITE_MAP bit by a direct
  AccessFlags check

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> (v2)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agovbo: move vbo_get_minmax_indices into its own source file
Nicolai Hähnle [Wed, 6 Jan 2016 19:06:32 +0000 (14:06 -0500)]
vbo: move vbo_get_minmax_indices into its own source file

We will add more code for caching/memoization. Moving the existing code
into its own file helps keep things modular.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomesa/main: bail earlier for size == 0 in _mesa_clear_buffer_sub_data
Nicolai Hähnle [Wed, 6 Jan 2016 22:57:49 +0000 (17:57 -0500)]
mesa/main: bail earlier for size == 0 in _mesa_clear_buffer_sub_data

Note that the conversion of the clear data (when data != NULL) can fail due
to an out of memory condition, but it does not check any error conditions
mandated by the spec. Therefore, it is safe to skip when size == 0.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomesa/main: add USAGE_PIXEL_PACK_BUFFER flag to buffer UsageHistory
Nicolai Hähnle [Thu, 7 Jan 2016 19:48:27 +0000 (14:48 -0500)]
mesa/main: add USAGE_PIXEL_PACK_BUFFER flag to buffer UsageHistory

We will want to disable minmax index caching for buffers that are used in this
way.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomesa/main: add USAGE_TRANSFORM_FEEDBACK_BUFFER flag to buffer UsageHistory
Nicolai Hähnle [Wed, 6 Jan 2016 22:38:19 +0000 (17:38 -0500)]
mesa/main: add USAGE_TRANSFORM_FEEDBACK_BUFFER flag to buffer UsageHistory

We will want to disable minmax index caching for buffers that are used in this
way.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agoutil/hash_table: add _mesa_hash_table_num_entries
Nicolai Hähnle [Mon, 11 Jan 2016 20:07:27 +0000 (15:07 -0500)]
util/hash_table: add _mesa_hash_table_num_entries

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agoutil/hash_table: add _mesa_hash_table_clear (v4)
Nicolai Hähnle [Wed, 6 Jan 2016 19:50:46 +0000 (14:50 -0500)]
util/hash_table: add _mesa_hash_table_clear (v4)

v4: coding style change (Matt Turner)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v3)
8 years agost/omx/dec/h264: fix corruption when scaling matrix present flag set
Leo Liu [Mon, 1 Feb 2016 18:32:31 +0000 (13:32 -0500)]
st/omx/dec/h264: fix corruption when scaling matrix present flag set

The scaling list should be filled out with zig zag scan

v2: integrate zig zag scan for list 4x4 to vl(Christian)
v3: move list determination out from the loop(Ilia)

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agovl: add zig zag scan for list 4x4
Leo Liu [Mon, 1 Feb 2016 17:04:34 +0000 (12:04 -0500)]
vl: add zig zag scan for list 4x4

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agollvmpipe: use scissor_planes_needed helper function
Roland Scheidegger [Tue, 2 Feb 2016 23:36:15 +0000 (00:36 +0100)]
llvmpipe: use scissor_planes_needed helper function

So it doesn't get out of sync in multiple places.

8 years agoi965/gen8: Initialize aux_mode to GEN8_SURFACE_AUX_MODE_NONE
Jordan Justen [Tue, 8 Jul 2014 18:17:57 +0000 (18:17 +0000)]
i965/gen8: Initialize aux_mode to GEN8_SURFACE_AUX_MODE_NONE

GEN8_SURFACE_AUX_MODE_NONE is 0, so this is a no-op.

Yet, this also makes it clear that we can compare aux_mode to the
other GEN8_SURFACE_AUX_MODE_ values. We will want to compare to
GEN8_SURFACE_AUX_MODE_HIZ.

v2: Some very minor cherry-pick conflicts due to moving it around in the series.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
8 years agomesa: use default geometry's samples when there are no attachments
Ilia Mirkin [Sun, 31 Jan 2016 06:09:40 +0000 (01:09 -0500)]
mesa: use default geometry's samples when there are no attachments

Whether multisampling is turned on depends, in part, on whether
attachments are themselves multisample surfaces. However when there are
no attachments, we should rely on the default geometry for this.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomesa: invalidate framebuffer when changing parameters
Ilia Mirkin [Sat, 23 Jan 2016 14:27:22 +0000 (09:27 -0500)]
mesa: invalidate framebuffer when changing parameters

This fixes dEQP-GLES31.functional.fbo.completeness.no_attachments

When the width or height are 0, the framebuffer is incomplete. We may
also not have been passing the new state down to the driver when the
widths/heights/etc changed. Make sure to dirty the state so that the
framebuffer state is revalidated at draw time.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agomesa: use geometric helper for computing min samples
Ilia Mirkin [Sun, 31 Jan 2016 05:44:14 +0000 (00:44 -0500)]
mesa: use geometric helper for computing min samples

In case we have a draw buffer without attachments, we should be looking
at the default number of samples.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agomesa: the _mesa_geometric_* functions require full types from mtypes.h
Ilia Mirkin [Sat, 23 Jan 2016 13:25:35 +0000 (08:25 -0500)]
mesa: the _mesa_geometric_* functions require full types from mtypes.h

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agowinsys/radeon: Do not deinit the pb cache if it was not initialized
Niels Ole Salscheider [Fri, 29 Jan 2016 21:48:57 +0000 (22:48 +0100)]
winsys/radeon: Do not deinit the pb cache if it was not initialized

This fixes a crash in pb_cache_release_all_buffers.

Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
8 years agotgsi/scan: add tgsi_shader_info::reads_samplemask
Marek Olšák [Fri, 8 Jan 2016 23:47:39 +0000 (00:47 +0100)]
tgsi/scan: add tgsi_shader_info::reads_samplemask

8 years agoradeonsi: rework RB+ for Stoney
Marek Olšák [Sun, 17 Jan 2016 20:13:16 +0000 (21:13 +0100)]
radeonsi: rework RB+ for Stoney

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
- disabled channels

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>