| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The 64-bit mask is a 16-bit mask per sample for up to 4 samples.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
| |
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
This needs to check the per-sample mask inside the loop if
multisample is enabled.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
This enables centroid interpolation to work, using the current
coverage masks.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
Don't allow the branching optimisation with multisample enabled
as we have to check all samples.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
This is using a load/store to make it easier to add sample shading later.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
| |
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
Converts alpha into coverage mask.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
| |
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
this just moves the num_fs loop around for follow on refactors
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
| |
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
This just adds the implementation and API to the interpolation builders.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
This just tracks the attribute interpolation location into the
interp code.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
translate sample and centroid locations.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
These will cause different fragment shaders to be generated.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
The fragment shader needs to be regenerated when multisample changes.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
| |
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
| |
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
This adds the nr_samples + sample_stride to the scene records
for cbufs and zsbuf.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
This just adds the interface and passes the depth and sample strides
into the fragment shader, nothing uses them yet.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
| |
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
This adds the clear paths for multisample textures.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
This allows direct copies of all samples between two resources.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
For clearing and copying textures llvmpipe needs to internally
access the per-sample data.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
This links up the api changing the sample mask to passing it into
the fragment shader.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
The incoming sample mask for the fragment shader can be passed
via the jit context
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
llvmpipe will want to reuse this for it's multisample clears.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
I doubt I'll care about much higher MSAA levels, so 4 it is.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
| |
This return 1 as a baseline and should be used in allocator paths.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
| |
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
This adds the support for num_samples/sample_stride retrieval to the
jit texture infrastructure.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
| |
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
| |
This adds the num samples + sampler stride into the texture mapping paths,
currently drivers just pass 0 for now.
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
| |
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
| |
Reviewed-by: Roland Scheidegger <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
|