mesa.git
4 years agogallivm/nir: hooks up texture samples queries
Dave Airlie [Mon, 23 Mar 2020 21:47:56 +0000 (07:47 +1000)]
gallivm/nir: hooks up texture samples queries

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agogallivm/sample: add num samples query for txqs (v2)
Dave Airlie [Mon, 23 Mar 2020 21:47:16 +0000 (07:47 +1000)]
gallivm/sample: add num samples query for txqs (v2)

v2: add false to the existing users (Roland)

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: enable 4x sample MSAA + texture multisample
Dave Airlie [Fri, 20 Mar 2020 21:40:48 +0000 (07:40 +1000)]
llvmpipe: enable 4x sample MSAA + texture multisample

This enables proper support for 4xMSAA and for texture mulitsample
extension.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agodrisw: add multisample support to sw dri layer.
Dave Airlie [Wed, 25 Mar 2020 02:47:20 +0000 (12:47 +1000)]
drisw: add multisample support to sw dri layer.

This allocates the msaa resources like the dri2 layer
and adds the flushes

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: don't choose pixel centers for multisample
Dave Airlie [Fri, 20 Mar 2020 21:38:13 +0000 (07:38 +1000)]
llvmpipe: don't choose pixel centers for multisample

Don't pick the pixel centers for multisample rendering, fix
the setup program.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: choose correct position for multisample
Dave Airlie [Fri, 20 Mar 2020 21:36:35 +0000 (07:36 +1000)]
llvmpipe: choose correct position for multisample

For multisample we don't want pixel centers at this stage,
so don't add them in for that case.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: choose multisample rasterizer functions per triangle (v2)
Dave Airlie [Fri, 20 Mar 2020 21:34:53 +0000 (07:34 +1000)]
llvmpipe: choose multisample rasterizer functions per triangle (v2)

This just picks the correct cmds to add to the scene.

v2: drop using 32-bit ms (Roland)

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: generate multisample triangle rasterizer functions (v2)
Dave Airlie [Fri, 20 Mar 2020 21:29:04 +0000 (07:29 +1000)]
llvmpipe: generate multisample triangle rasterizer functions (v2)

This uses the templating to generate multisample version of the
tri plane raster functions

This doesn't generate any optimised version for lower plane numbers,
maybe this is worth doing in the future.

v2: drop generating 32-bit msaa (Roland)

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: fixup multisample coverage masks for covered tiles
Dave Airlie [Fri, 20 Mar 2020 21:16:35 +0000 (07:16 +1000)]
llvmpipe: fixup multisample coverage masks for covered tiles

For fully covered tiles just pass in the filled out mask.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: build 64-bit coverage mask in rasterizer
Dave Airlie [Fri, 20 Mar 2020 21:09:15 +0000 (07:09 +1000)]
llvmpipe: build 64-bit coverage mask in rasterizer

This adds the logic to build the per-sample masks at the lowest
level of the rasterizer block hierarchy

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add fixed point sample positions to scene.
Dave Airlie [Fri, 20 Mar 2020 21:11:39 +0000 (07:11 +1000)]
llvmpipe: add fixed point sample positions to scene.

These will be used in the rasterizer to generate the coverage masks

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add new rast api to pass full 64-bit mask.
Dave Airlie [Fri, 20 Mar 2020 21:07:53 +0000 (07:07 +1000)]
llvmpipe: add new rast api to pass full 64-bit mask.

The 64-bit mask is a 16-bit mask per sample for up to 4 samples.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: disable opaque variant for multisample
Dave Airlie [Fri, 20 Mar 2020 20:58:01 +0000 (06:58 +1000)]
llvmpipe: disable opaque variant for multisample

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: fix multisample occlusion queries.
Dave Airlie [Tue, 24 Mar 2020 02:54:52 +0000 (12:54 +1000)]
llvmpipe: fix multisample occlusion queries.

This needs to check the per-sample mask inside the loop if
multisample is enabled.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: move color storing earlier in frag shader
Dave Airlie [Fri, 20 Mar 2020 20:54:26 +0000 (06:54 +1000)]
llvmpipe: move color storing earlier in frag shader

Move the color storage before the late Z test as for sample
shading it needs to be inside a loop with the fragment shader.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: pass mask store into interp for centroid interpolation
Dave Airlie [Fri, 20 Mar 2020 20:50:48 +0000 (06:50 +1000)]
llvmpipe: pass mask store into interp for centroid interpolation

This enables centroid interpolation to work, using the current
coverage masks.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: don't allow branch to end for early Z with multisample
Dave Airlie [Fri, 20 Mar 2020 20:47:31 +0000 (06:47 +1000)]
llvmpipe: don't allow branch to end for early Z with multisample

Don't allow the branching optimisation with multisample enabled
as we have to check all samples.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: handle gl_SampleMask writing.
Dave Airlie [Fri, 20 Mar 2020 09:38:50 +0000 (19:38 +1000)]
llvmpipe: handle gl_SampleMask writing.

This is using a load/store to make it easier to add sample shading later.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add multisample alpha to one support
Dave Airlie [Fri, 20 Mar 2020 09:30:06 +0000 (19:30 +1000)]
llvmpipe: add multisample alpha to one support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add multisample alpha to coverage support.
Dave Airlie [Fri, 20 Mar 2020 09:28:59 +0000 (19:28 +1000)]
llvmpipe: add multisample alpha to coverage support.

Converts alpha into coverage mask.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: hook up sample position system value
Dave Airlie [Fri, 20 Mar 2020 04:29:46 +0000 (14:29 +1000)]
llvmpipe: hook up sample position system value

This creates a global static with the current sample positions,
and passes it to the fragment shader which uses it for interpolation
and sample position support.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: handle multisample color stores.
Dave Airlie [Fri, 20 Mar 2020 04:10:48 +0000 (14:10 +1000)]
llvmpipe: handle multisample color stores.

Extract the final per-sample masks and store to the multisample
color buffers using them.

This retypes the pointer to a uint8_t at entry to make the
GEP simpler, then recasts to the blend type.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: interpolate Z at sample points for early depth test.
Dave Airlie [Wed, 25 Mar 2020 02:47:53 +0000 (12:47 +1000)]
llvmpipe: interpolate Z at sample points for early depth test.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: handle multisample early depth test/late depth write
Dave Airlie [Fri, 20 Mar 2020 04:01:54 +0000 (14:01 +1000)]
llvmpipe: handle multisample early depth test/late depth write

A set of values have to be passed from the early depth test to the
late depth write, when multisampling is enabled, a range of those
values have to be stored between stages, so create storage for them
and pass the values through the storage.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: multisample sample mask + early/late depth pass
Dave Airlie [Fri, 20 Mar 2020 03:48:08 +0000 (13:48 +1000)]
llvmpipe: multisample sample mask + early/late depth pass

Start adding support for multisample masks and the depth passes

The depth passes have to run per-sample, this isn't complete support
it adds the loops, and handles the execution masks.

One mask is stored per sample, they are combined post the early Z
pass into a single shader execution mask, and then the resulting
shader execution mask is anded back in for the late Z pass.

Init the vars to NULL to avoid gcc warnings

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: move some fs code around
Dave Airlie [Fri, 20 Mar 2020 03:29:13 +0000 (13:29 +1000)]
llvmpipe: move some fs code around

this just moves the num_fs loop around for follow on refactors

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add per-sample depth/stencil test
Dave Airlie [Thu, 19 Mar 2020 05:54:08 +0000 (15:54 +1000)]
llvmpipe: add per-sample depth/stencil test

The current depth stencil test code has some optimisations using
the mask when there is only one depth value, multisample requires
per-sample zstencil testing, and for that case just pass in the
mask that needs updating.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: move getting mask value out of depth code. (v2)
Dave Airlie [Thu, 19 Mar 2020 05:47:14 +0000 (15:47 +1000)]
llvmpipe: move getting mask value out of depth code. (v2)

In order to add per-sample support to this code, the mask
value is needed not the value from the exec mask.

v2: update comment

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add per-sample interpolation.
Dave Airlie [Thu, 19 Mar 2020 05:40:31 +0000 (15:40 +1000)]
llvmpipe: add per-sample interpolation.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add centroid interpolation support.
Dave Airlie [Thu, 19 Mar 2020 05:24:11 +0000 (15:24 +1000)]
llvmpipe: add centroid interpolation support.

This just adds the implementation and API to the interpolation builders.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: pass interp location into interpolation code.
Dave Airlie [Thu, 19 Mar 2020 04:41:22 +0000 (14:41 +1000)]
llvmpipe: pass interp location into interpolation code.

This just tracks the attribute interpolation location into the
interp code.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agonir/tgsi: translate the interp location
Dave Airlie [Thu, 19 Mar 2020 04:25:25 +0000 (14:25 +1000)]
nir/tgsi: translate the interp location

translate sample and centroid locations.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agogallivm: add mask api to force mask
Dave Airlie [Thu, 19 Mar 2020 04:10:31 +0000 (14:10 +1000)]
gallivm: add mask api to force mask

For per-sample shading the mask needs to be forced for each
iteration of the fragment shader.

Just adds the API for now.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agogallivm: add sample id/pos intrinsic support
Dave Airlie [Thu, 19 Mar 2020 04:04:47 +0000 (14:04 +1000)]
gallivm: add sample id/pos intrinsic support

The sample position is looked up in an incoming array using the
sample id.

(These are mostly for ARB_sample_shading support)

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add cbuf/zsbuf + coverage samples to the fragment shader key.
Dave Airlie [Tue, 10 Mar 2020 22:44:40 +0000 (08:44 +1000)]
llvmpipe: add cbuf/zsbuf + coverage samples to the fragment shader key.

These will cause different fragment shaders to be generated.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: change mask input to fragment shader to 64-bit.
Dave Airlie [Tue, 10 Mar 2020 22:23:10 +0000 (08:23 +1000)]
llvmpipe: change mask input to fragment shader to 64-bit.

In order to handle a 4xMSAA mask (16-bits per sample) increase
the fragment shader API to be 64-bit.

v2: drop pointless if (Roland)

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add multisample bit to fragment shader key.
Dave Airlie [Tue, 10 Mar 2020 22:11:31 +0000 (08:11 +1000)]
llvmpipe: add multisample bit to fragment shader key.

The fragment shader needs to be regenerated when multisample changes.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: plumb multisample state bit into setup code.
Dave Airlie [Tue, 10 Mar 2020 22:09:22 +0000 (08:09 +1000)]
llvmpipe: plumb multisample state bit into setup code.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe/rast: fix tile clearing for multisample color and depth tiles
Dave Airlie [Tue, 10 Mar 2020 05:28:02 +0000 (15:28 +1000)]
llvmpipe/rast: fix tile clearing for multisample color and depth tiles

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: record sample info for color/depth buffers in scene
Dave Airlie [Tue, 10 Mar 2020 05:09:37 +0000 (15:09 +1000)]
llvmpipe: record sample info for color/depth buffers in scene

This adds the nr_samples + sample_stride to the scene records
for cbufs and zsbuf.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: pass color and depth sample strides into fragment shader.
Dave Airlie [Tue, 7 Apr 2020 23:49:47 +0000 (09:49 +1000)]
llvmpipe: pass color and depth sample strides into fragment shader.

This just adds the interface and passes the depth and sample strides
into the fragment shader, nothing uses them yet.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agodraw: disable point/line smoothing for multisample (v2)
Dave Airlie [Tue, 10 Mar 2020 03:51:24 +0000 (13:51 +1000)]
draw: disable point/line smoothing for multisample (v2)

When MSAA is enabled smoothing is ignored

v2: As pointed out by Roland I got this completely wrong,
fix this to work the other way

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: handle multisample render target clears
Dave Airlie [Tue, 24 Mar 2020 06:18:46 +0000 (16:18 +1000)]
llvmpipe: handle multisample render target clears

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add clear texture support for multisample textures.
Dave Airlie [Tue, 10 Mar 2020 03:37:07 +0000 (13:37 +1000)]
llvmpipe: add clear texture support for multisample textures.

This adds the clear paths for multisample textures.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add multisample resource copy region support.
Dave Airlie [Tue, 10 Mar 2020 03:36:36 +0000 (13:36 +1000)]
llvmpipe: add multisample resource copy region support.

This allows direct copies of all samples between two resources.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add internal multisample texture mapping path.
Dave Airlie [Tue, 10 Mar 2020 03:34:33 +0000 (13:34 +1000)]
llvmpipe: add internal multisample texture mapping path.

For clearing and copying textures llvmpipe needs to internally
access the per-sample data.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: pass incoming sample_mask into fragment shader context.
Dave Airlie [Tue, 10 Mar 2020 03:21:48 +0000 (13:21 +1000)]
llvmpipe: pass incoming sample_mask into fragment shader context.

This links up the api changing the sample mask to passing it into
the fragment shader.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe/jit: pass fragment sample mask via jit context.
Dave Airlie [Tue, 10 Mar 2020 03:06:30 +0000 (13:06 +1000)]
llvmpipe/jit: pass fragment sample mask via jit context.

The incoming sample mask for the fragment shader can be passed
via the jit context

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add get_sample_position support (v2)
Dave Airlie [Tue, 10 Mar 2020 03:04:01 +0000 (13:04 +1000)]
llvmpipe: add get_sample_position support (v2)

This just adds the sample values for 4xmsaa, and hooks them
up to the get_sample_position API

v2: move to vulkan standard sample positions

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: fix race between draw and setting fragment shader.
Dave Airlie [Tue, 10 Mar 2020 02:55:31 +0000 (12:55 +1000)]
llvmpipe: fix race between draw and setting fragment shader.

There is a race with u_blitter shaders + pipeline shaders (aaline/aapoint)
where the draw bind can cause a pipeline flush which can use bind_fs_state to
 be reenters and llvmpipe->fs gets the wrong value. Fix this by only
setting the llvmpipe->fs value after the draw binding is complete.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agogallium/util: split out zstencil clearing code.
Dave Airlie [Tue, 10 Mar 2020 02:46:02 +0000 (12:46 +1000)]
gallium/util: split out zstencil clearing code.

llvmpipe will want to reuse this for it's multisample clears.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add a max samples define set to 4.
Dave Airlie [Tue, 10 Mar 2020 00:50:49 +0000 (10:50 +1000)]
llvmpipe: add a max samples define set to 4.

I doubt I'll care about much higher MSAA levels, so 4 it is.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add multisample support to texture allocator.
Dave Airlie [Tue, 10 Mar 2020 00:30:13 +0000 (10:30 +1000)]
llvmpipe: add multisample support to texture allocator.

This adds a sample stride field and allocates enough memory for
each sample storage. Hook up the sample_stride field to draw
and jit textures and images

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agoutil: add a resource wrapper to get resource samples
Dave Airlie [Mon, 30 Dec 2019 21:03:26 +0000 (07:03 +1000)]
util: add a resource wrapper to get resource samples

This return 1 as a baseline and should be used in allocator paths.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add samples support to image jit
Dave Airlie [Mon, 23 Mar 2020 05:11:37 +0000 (15:11 +1000)]
llvmpipe: add samples support to image jit

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agollvmpipe: add num_samples/sample_stride support to jit textures
Dave Airlie [Tue, 10 Mar 2020 00:22:49 +0000 (10:22 +1000)]
llvmpipe: add num_samples/sample_stride support to jit textures

This adds the support for num_samples/sample_stride retrieval to the
jit texture infrastructure.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agodraw: add support for num_samples + sample_stride to the image paths
Dave Airlie [Mon, 23 Mar 2020 05:07:11 +0000 (15:07 +1000)]
draw: add support for num_samples + sample_stride to the image paths

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agodraw: introduce sampler num samples + stride members
Dave Airlie [Tue, 10 Mar 2020 00:15:21 +0000 (10:15 +1000)]
draw: introduce sampler num samples + stride members

This adds the num samples + sampler stride into the texture mapping paths,
currently drivers just pass 0 for now.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agogallivm/nir: add multisample image operations
Dave Airlie [Mon, 23 Mar 2020 05:15:51 +0000 (15:15 +1000)]
gallivm/nir: add multisample image operations

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agogallivm/nir: add multisample support to image size
Dave Airlie [Mon, 23 Mar 2020 03:55:08 +0000 (13:55 +1000)]
gallivm/nir: add multisample support to image size

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agogallivm/nir/tgsi: add multisample texture sampling.
Dave Airlie [Mon, 9 Mar 2020 23:51:17 +0000 (09:51 +1000)]
gallivm/nir/tgsi: add multisample texture sampling.

Both paths are required as u_blitter needs the TGSI path.

This just hooks the instructions up to the sampling code.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agogallivm/sample: add multisample image operation support
Dave Airlie [Mon, 23 Mar 2020 05:15:27 +0000 (15:15 +1000)]
gallivm/sample: add multisample image operation support

Just adds in the sample stride.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agogallivm/sample: add multisample support for texel fetch
Dave Airlie [Mon, 9 Mar 2020 23:38:07 +0000 (09:38 +1000)]
gallivm/sample: add multisample support for texel fetch

This adds a new callback to get the stride between the per-sample
images, adds a new value for the per-sample index to lookup,
and a flag to use multisampling.

gallivm/sample: add num samples interface for dynamic samplers

This will be used for getting number of samples in jit code.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>

4 years agovirgl: Properly check for encode_stride when encoding transfers
Tomeu Vizoso [Mon, 27 Apr 2020 07:16:49 +0000 (09:16 +0200)]
virgl: Properly check for encode_stride when encoding transfers

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4763>

4 years agollvmpipe: simple texture barrier implementation.
Dave Airlie [Thu, 26 Mar 2020 02:06:34 +0000 (12:06 +1000)]
llvmpipe: simple texture barrier implementation.

Just flush.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4774>

4 years agollvmpipo/nir: free compute shader NIR
Dave Airlie [Tue, 5 May 2020 06:03:34 +0000 (16:03 +1000)]
llvmpipo/nir: free compute shader NIR

I forgot this in the last round.

Fixes: 18f896e55d96 (llvmpipe: add initial nir support)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4899>

4 years agodraw/tess: free tessellation control shader i/o memory.
Dave Airlie [Tue, 5 May 2020 06:02:39 +0000 (16:02 +1000)]
draw/tess: free tessellation control shader i/o memory.

Fixes: 0d02a7b8ca79 (draw: add main tessellation code)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4899>

4 years agonir: add missing group_memory_barrier handling
Rhys Perry [Mon, 4 May 2020 17:54:11 +0000 (18:54 +0100)]
nir: add missing group_memory_barrier handling

Totals from 2 (0.00% of 127638) affected shaders:
VGPRs: 164 -> 168 (+2.44%)
CodeSize: 18420 -> 18756 (+1.82%)
Instrs: 3658 -> 3700 (+1.15%)
Cycles: 82912 -> 83080 (+0.20%)
VMEM: 70 -> 69 (-1.43%)
PreVGPRs: 155 -> 168 (+8.39%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
CC: <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4889>

4 years agofreedreno/ir3: Disable sin/cos range reduction for mediump.
Eric Anholt [Mon, 4 May 2020 21:10:40 +0000 (14:10 -0700)]
freedreno/ir3: Disable sin/cos range reduction for mediump.

robclark noted that the blob wasn't doing range reduction in the mediump
case, and I confirmed it on
dEQP-GLES3.functional.shaders.operator.angle_and_trigonometry.sin.mediump_float_fragment
vs
dEQP-GLES3.functional.shaders.operator.angle_and_trigonometry.sin.highp_float_fragment.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4893>

4 years agost/nine: Set correctly blend max_rt
Axel Davy [Mon, 4 May 2020 20:40:08 +0000 (22:40 +0200)]
st/nine: Set correctly blend max_rt

Currently nine_convert_blend_state has no way
of knowing the number of rts.
For now set to an upper bound.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4891>

4 years agoradeonsi: enable TC-compatible HTILE on demand for best Z/S performance
Marek Olšák [Sat, 2 May 2020 21:58:15 +0000 (17:58 -0400)]
radeonsi: enable TC-compatible HTILE on demand for best Z/S performance

I haven't measured this, but it can only help.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4866>

4 years agoradeonsi: allow tc_compatible_htile to be mutable
Marek Olšák [Sat, 2 May 2020 21:34:16 +0000 (17:34 -0400)]
radeonsi: allow tc_compatible_htile to be mutable

Move the relevant code from si_init_depth_surface to
si_emit_framebuffer_state, so that it can be changed after a pipe_surface
is initialized.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4866>

4 years agoradeonsi/gfx9: always use IMG_DATA_FORMAT_S8_32 for 8-bit stencil
Marek Olšák [Sat, 2 May 2020 20:35:16 +0000 (16:35 -0400)]
radeonsi/gfx9: always use IMG_DATA_FORMAT_S8_32 for 8-bit stencil

I wanna remove dependency on tc_compatible_htile from non-dynamic states.
This should be the same as 8_UINT if HTILE is disabled.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4866>

4 years agoac/surface: unset RADEON_SURF_TC_COMPATIBLE_HTILE if HTILE hasn't been computed
Marek Olšák [Sat, 2 May 2020 20:19:00 +0000 (16:19 -0400)]
ac/surface: unset RADEON_SURF_TC_COMPATIBLE_HTILE if HTILE hasn't been computed

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4866>

4 years agoradeonsi: don't wait for idle at the end of gfx IBs
Marek Olšák [Mon, 4 May 2020 21:41:41 +0000 (17:41 -0400)]
radeonsi: don't wait for idle at the end of gfx IBs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4894>

4 years agoac/nir: export some undef as zero
Pierre-Eric Pelloux-Prayer [Tue, 28 Apr 2020 14:34:49 +0000 (16:34 +0200)]
ac/nir: export some undef as zero

NIR already optimizes undef usage.
If undef reaches llvm, it's probably because of a broken shader.

In this situation, rather than letting llvm use the undef values
to do more optimization and probably produce incorrect results,
we replace undef values by 0.

"undef" values that are directly used in exports are kept as undef,
because this allows llvm to optimize them away.

This is only enabled for radeonsi.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2689
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4607>

4 years agogallium: add a new cap PIPE_CAP_GLSL_ZERO_INIT
Pierre-Eric Pelloux-Prayer [Fri, 24 Apr 2020 16:14:40 +0000 (18:14 +0200)]
gallium: add a new cap PIPE_CAP_GLSL_ZERO_INIT

Allows driver to select a zero init mode between the 3 possible values.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4607>

4 years agomesa: extend GLSLZeroInit semantics
Pierre-Eric Pelloux-Prayer [Fri, 24 Apr 2020 16:32:02 +0000 (18:32 +0200)]
mesa: extend GLSLZeroInit semantics

This commit introduces a new way to zero-init variables but keep the
old one to not break any existing behavior.

With this change GLSLZeroInit becomes an integer, with the following
possible values:
 - 0: no 0 init
 - 1: current behavior
 - 2: new behavior. Similar to 1, except ir_var_function_out type are
      0 initialized but ir_var_shader_out.

The rationale behind 2 is: zero initializing ir_var_shader_out can
prevent some optimization where out variables are completely eliminated
when not written to.

On the other hand, zero initializing "ir_var_function_out" has no
effect on correct shaders but typically helps shadertoy since the main
function is:

   void mainImage(out vec4 fragColor) { ... }

So with this change we're sure that fragColor will always get a value.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4607>

4 years agoglsl: add a is_implicit_initializer flag
Pierre-Eric Pelloux-Prayer [Thu, 30 Apr 2020 13:06:08 +0000 (15:06 +0200)]
glsl: add a is_implicit_initializer flag

Shared globals and glsl_zero_init can cause linker errors if the
variable is only initialized in 1 place.

This commit adds a flag to variables that have been implicitely
initialized to be able in this situation to keep the explicit
initialization value.

Without this change the global-single-initializer-2-shaders piglit
test fails when using glsl_zero_init.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4607>

4 years agoglsl: rework zero initialization
Pierre-Eric Pelloux-Prayer [Fri, 24 Apr 2020 15:55:38 +0000 (17:55 +0200)]
glsl: rework zero initialization

This commit makes zero_init a bitfield of types of variables to zeroinit.

This will allow some flexibility that will be used in the next commit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4607>

4 years agoglsl: init gl_FragColor if zero_init=true
Pierre-Eric Pelloux-Prayer [Fri, 24 Apr 2020 10:17:14 +0000 (12:17 +0200)]
glsl: init gl_FragColor if zero_init=true

This fixes shaders doing "gl_FragColor += ..." and doesn't hurt correct
shaders, because the zero init is discarded.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4607>

4 years agoradeonsi: don't print gs_copy_shader stats for shaderdb
Pierre-Eric Pelloux-Prayer [Fri, 24 Apr 2020 10:17:04 +0000 (12:17 +0200)]
radeonsi: don't print gs_copy_shader stats for shaderdb

Fixes: dbc86fa3de6 ("radeonsi: dump shader stats when hitting the live cache")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4607>

4 years agoradv: enable shaderInt16 unconditionally with LLVM and only GFX8+ with ACO
Samuel Pitoiset [Mon, 4 May 2020 10:01:41 +0000 (12:01 +0200)]
radv: enable shaderInt16 unconditionally with LLVM and only GFX8+ with ACO

The Vulkan spec says:

"shaderInt16 specifies whether 16-bit integers (signed and unsigned)
are supported in shader code. If this feature is not enabled, 16-bit
integer types must not be used in shader code."

I think it's just safe to enable it because 16-bit integers should
be fully supported with LLVM and also with ACO and GFX8+. On GFX8
and earlier generations, throughput of 16-bit int is same as 32-bit
but that should't change anything.

For GFX6-GFX7 ACO support, we have to implement conversions without
SDWA.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4874>

4 years agoradeonsi: add workaround for issue 2647
Pierre-Eric Pelloux-Prayer [Fri, 24 Apr 2020 09:58:12 +0000 (11:58 +0200)]
radeonsi: add workaround for issue 2647

For unknown reasons pixel shaders in KSP game get executed with
infinite interpolation coefficients and this causes an infinite
loop in the shader.

This commit adds a hacky workaround that kills pixel shaders if
invalid interp coeffs are detected and enables it for KSP.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2174
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2647
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4700>

4 years agozink: use nir_lower_uniforms_to_ubo
Erik Faye-Lund [Fri, 24 Apr 2020 15:13:45 +0000 (17:13 +0200)]
zink: use nir_lower_uniforms_to_ubo

Instead of open-coding uniform -> UBO lowering, let's instead use the
one that already exists. This should make things a bit simpler going
forward.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4734>

4 years agonir: Always create UBO variable when lowering uniforms to ubo
Louis-Francis Ratté-Boulianne [Fri, 14 Feb 2020 07:14:07 +0000 (02:14 -0500)]
nir: Always create UBO variable when lowering uniforms to ubo

Zink needs to know the sizes of UBOs, and for normal UBOs we get this
from the nir_var_mem_ubo variables. This allows us to treat all of these
the same way.

We're about to need the same information for the in-progress D3D12
driver, so let's do this in a central location instead of in the driver.

This version is also a bit more careful than the Zink version. In
particular, for two reasons:
1. We increase the variable bindings when we adjust the pre-existing
   UBOs.
2. We increase shader->info.num_ubos when we insert a new UBO variable.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4734>

4 years agomesa/st: consider NumUniformBlocks instead of num_ubos when binding
Erik Faye-Lund [Wed, 29 Apr 2020 10:29:46 +0000 (12:29 +0200)]
mesa/st: consider NumUniformBlocks instead of num_ubos when binding

This is the number of uniform blocks at linking time, not after
finalizing shaders.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4734>

4 years agocompiler/glsl: explicitly store NumUniformBlocks
Erik Faye-Lund [Tue, 28 Apr 2020 11:28:16 +0000 (13:28 +0200)]
compiler/glsl: explicitly store NumUniformBlocks

It's not great to use shader_info for this information, because it
might have gone through lowering of uniforms to UBOs, which can change
the number of UBOs. So let's make sure we know the size of the
UniformBlocks array from when the shader was linked instead.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4734>

4 years agoglsl: rename has_implicit_uint_to_int_conversion to *_int_to_uint_*
Danylo Piliaiev [Mon, 4 May 2020 14:49:26 +0000 (17:49 +0300)]
glsl: rename has_implicit_uint_to_int_conversion to *_int_to_uint_*

There is no uint to int implicit conversion in glsl, this is just
a typo in the name of this function. The correct one would be:
has_implicit_int_to_uint_conversion.

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4884>

4 years agodriconf: add force_integer_tex_nearest option
Pierre-Eric Pelloux-Prayer [Mon, 20 Apr 2020 12:20:28 +0000 (14:20 +0200)]
driconf: add force_integer_tex_nearest option

And enable it for "GRID Autosport" and "DIRT: Showdown" games.

CC: 20.1 <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1258
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4647>

4 years agomesa: add gl_coontext::ForceIntegerTexNearest
Pierre-Eric Pelloux-Prayer [Mon, 20 Apr 2020 12:17:53 +0000 (14:17 +0200)]
mesa: add gl_coontext::ForceIntegerTexNearest

Some applications incorrectly use GL_LINEAR* values for integers texture.
copyimage.c already implemented a tolerance for such app in prepare_target_err.

This commit adds a boolean that will treat GL_LINEAR* filters as
GL_NEAREST for integer textures.

CC: 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4647>

4 years agoaco: remove unecessary p_split_vector with v2b reg class
Samuel Pitoiset [Mon, 4 May 2020 12:40:56 +0000 (14:40 +0200)]
aco: remove unecessary p_split_vector with v2b reg class

Should be fine now that RA take full registers for v2b if it's
not an SDWA instruction.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4879>

4 years agovulkan: Update Vulkan XML and headers to 1.2.140
Joshua Ashton [Mon, 4 May 2020 12:33:42 +0000 (13:33 +0100)]
vulkan: Update Vulkan XML and headers to 1.2.140

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4878>

4 years agoturnip: Remove RANGE_SIZE usage
Joshua Ashton [Mon, 4 May 2020 12:36:41 +0000 (13:36 +0100)]
turnip: Remove RANGE_SIZE usage

These were removed from the latest Vulkan headers
https://github.com/KhronosGroup/Vulkan-Docs/issues/1230

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4878>

4 years agoradv: Remove RANGE_SIZE usage
Joshua Ashton [Mon, 4 May 2020 10:53:03 +0000 (11:53 +0100)]
radv: Remove RANGE_SIZE usage

These were removed from the latest Vulkan headers
https://github.com/KhronosGroup/Vulkan-Docs/issues/1230

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4878>

4 years agoanv: Remove RANGE_SIZE usage
Joshua Ashton [Mon, 4 May 2020 10:52:55 +0000 (11:52 +0100)]
anv: Remove RANGE_SIZE usage

These were removed from the latest Vulkan headers
https://github.com/KhronosGroup/Vulkan-Docs/issues/1230

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4878>

4 years agoandroid: iris: add iris_seqno.{c,h} to Makefile.sources
Mauro Rossi [Sat, 2 May 2020 07:31:02 +0000 (09:31 +0200)]
android: iris: add iris_seqno.{c,h} to Makefile.sources

Fixes the following undefined symbol building errors:

ld.lld: error: undefined symbol: iris_seqno_init
>>> referenced by iris_batch.c:187 (external/mesa/src/gallium/drivers/iris/iris_batch.c:187)
>>>               iris_batch.o:(iris_init_batch) in archive out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_iris_intermediates/libmesa_pipe_iris.a

Fixes: e31b703c ("iris: Place a seqno at the end of every batch")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
4 years agoac/surface: fix MSAA crash with FORCE_SWIZZLE_MODE on gfx9
Marek Olšák [Sat, 2 May 2020 14:56:20 +0000 (10:56 -0400)]
ac/surface: fix MSAA crash with FORCE_SWIZZLE_MODE on gfx9

Fixes: 3dc2ccc14c0e035 "ac/surface: replace RADEON_SURF_OPTIMIZE_FOR_SPACE with !FORCE_SWIZZLE_MODE"
Closes: #2884
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4862>

4 years agopan/bit: Add IMATH packing tests
Alyssa Rosenzweig [Mon, 4 May 2020 18:40:26 +0000 (14:40 -0400)]
pan/bit: Add IMATH packing tests

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4890>

4 years agopan/bit: Factor out identity swizzle helper
Alyssa Rosenzweig [Mon, 4 May 2020 18:13:29 +0000 (14:13 -0400)]
pan/bit: Factor out identity swizzle helper

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4890>