Samuel Pitoiset
b867a677e9
radv: rename radv_devices() to radv_enumerate_physical_devices()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4806 >
2020-05-06 06:44:20 +00:00
Samuel Pitoiset
c504328741
radv: cleanup radv_CreateInstance()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4806 >
2020-05-06 06:44:20 +00:00
Dave Airlie
dab8803af4
llvmpipe: enable ARB_sample_shading
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122 >
2020-05-06 06:20:38 +00:00
Dave Airlie
8a83db4204
llvmpipe: add min samples support to the fragment shader.
...
This isn't enabled yet until the state gets hooked up
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122 >
2020-05-06 06:20:38 +00:00
Dave Airlie
d237e03a16
llvmpipe: enable GL_ARB_shader_texture_image_samples
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122 >
2020-05-06 06:20:38 +00:00
Dave Airlie
f036643772
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
8d09d62137
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
3cc50cabf1
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
94c4577331
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
7898978377
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
8297513aa9
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
b72f504e99
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
26cc01cefd
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
8611a6b34b
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
2d13591ba4
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
88851c4798
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
78b7f22838
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
c638a59fa8
llvmpipe: disable opaque variant for multisample
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122 >
2020-05-06 06:20:38 +00:00
Dave Airlie
c5021ebb15
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
335938cffd
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
acba9a93ef
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
367332b0fc
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
d9276ae965
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 >
2020-05-06 06:20:38 +00:00
Dave Airlie
69009949e0
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
66a92e5d92
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
38e81938b6
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
210d714f46
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
102558912b
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
a0195240c4
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
9f8c7e232e
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
f12dac5e10
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
5e949b16c1
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
d297f2ecf1
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
18fd62a26e
llvmpipe: add per-sample interpolation.
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122 >
2020-05-06 06:20:37 +00:00
Dave Airlie
8154bdf25b
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
5697b9c00c
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
339a3a4dea
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
28cc2ed79c
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
d89499063b
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
455c8e3584
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
d2f488684a
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
67ec1760ee
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
f5463576b9
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
e47d39aee1
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
01e9779c00
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
a30db60ede
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
24cf7a2b36
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
4c72bb4a96
llvmpipe: handle multisample render target clears
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122 >
2020-05-06 06:20:37 +00:00
Dave Airlie
782271c0e1
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 >
2020-05-06 06:20:37 +00:00
Dave Airlie
c8740cbf01
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 >
2020-05-06 06:20:37 +00:00