aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* llvmpipe: add new rast api to pass full 64-bit mask.Dave Airlie2020-05-062-7/+21
| | | | | | | 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>
* llvmpipe: disable opaque variant for multisampleDave Airlie2020-05-061-0/+1
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: fix multisample occlusion queries.Dave Airlie2020-05-061-7/+8
| | | | | | | | 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>
* llvmpipe: move color storing earlier in frag shaderDave Airlie2020-05-061-23/+24
| | | | | | | | 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>
* llvmpipe: pass mask store into interp for centroid interpolationDave Airlie2020-05-061-1/+1
| | | | | | | | 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>
* llvmpipe: don't allow branch to end for early Z with multisampleDave Airlie2020-05-061-1/+1
| | | | | | | | 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>
* llvmpipe: handle gl_SampleMask writing.Dave Airlie2020-05-061-6/+25
| | | | | | | 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>
* llvmpipe: add multisample alpha to one supportDave Airlie2020-05-061-1/+10
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add multisample alpha to coverage support.Dave Airlie2020-05-061-3/+35
| | | | | | | Converts alpha into coverage mask. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: hook up sample position system valueDave Airlie2020-05-061-1/+26
| | | | | | | | | 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>
* llvmpipe: handle multisample color stores.Dave Airlie2020-05-061-12/+35
| | | | | | | | | | | 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>
* llvmpipe: interpolate Z at sample points for early depth test.Dave Airlie2020-05-063-7/+14
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: handle multisample early depth test/late depth writeDave Airlie2020-05-061-0/+41
| | | | | | | | | | 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>
* llvmpipe: multisample sample mask + early/late depth passDave Airlie2020-05-061-25/+142
| | | | | | | | | | | | | | | | 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>
* llvmpipe: move some fs code aroundDave Airlie2020-05-061-10/+9
| | | | | | | 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>
* llvmpipe: add per-sample depth/stencil testDave Airlie2020-05-063-6/+22
| | | | | | | | | | 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>
* llvmpipe: move getting mask value out of depth code. (v2)Dave Airlie2020-05-063-7/+5
| | | | | | | | | | 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>
* llvmpipe: add per-sample interpolation.Dave Airlie2020-05-063-6/+17
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add centroid interpolation support.Dave Airlie2020-05-063-7/+65
| | | | | | | 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>
* llvmpipe: pass interp location into interpolation code.Dave Airlie2020-05-063-1/+6
| | | | | | | | 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>
* nir/tgsi: translate the interp locationDave Airlie2020-05-061-0/+5
| | | | | | | translate sample and centroid locations. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* gallivm: add mask api to force maskDave Airlie2020-05-062-0/+14
| | | | | | | | | | 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>
* gallivm: add sample id/pos intrinsic supportDave Airlie2020-05-063-0/+15
| | | | | | | | | | 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>
* llvmpipe: add cbuf/zsbuf + coverage samples to the fragment shader key.Dave Airlie2020-05-062-0/+13
| | | | | | | 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>
* llvmpipe: change mask input to fragment shader to 64-bit.Dave Airlie2020-05-064-8/+14
| | | | | | | | | | 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>
* llvmpipe: add multisample bit to fragment shader key.Dave Airlie2020-05-062-0/+5
| | | | | | | 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>
* llvmpipe: plumb multisample state bit into setup code.Dave Airlie2020-05-064-3/+8
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe/rast: fix tile clearing for multisample color and depth tilesDave Airlie2020-05-061-78/+83
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: record sample info for color/depth buffers in sceneDave Airlie2020-05-065-4/+26
| | | | | | | | 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>
* llvmpipe: pass color and depth sample strides into fragment shader.Dave Airlie2020-05-064-5/+33
| | | | | | | | 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>
* draw: disable point/line smoothing for multisample (v2)Dave Airlie2020-05-063-12/+12
| | | | | | | | | | 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>
* llvmpipe: handle multisample render target clearsDave Airlie2020-05-061-37/+55
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add clear texture support for multisample textures.Dave Airlie2020-05-061-1/+124
| | | | | | | 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>
* llvmpipe: add multisample resource copy region support.Dave Airlie2020-05-061-0/+51
| | | | | | | 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>
* llvmpipe: add internal multisample texture mapping path.Dave Airlie2020-05-062-7/+27
| | | | | | | | 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>
* llvmpipe: pass incoming sample_mask into fragment shader context.Dave Airlie2020-05-066-3/+22
| | | | | | | | 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>
* llvmpipe/jit: pass fragment sample mask via jit context.Dave Airlie2020-05-062-0/+10
| | | | | | | | 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>
* llvmpipe: add get_sample_position support (v2)Dave Airlie2020-05-063-1/+22
| | | | | | | | | | 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>
* llvmpipe: fix race between draw and setting fragment shader.Dave Airlie2020-05-061-5/+5
| | | | | | | | | | 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>
* gallium/util: split out zstencil clearing code.Dave Airlie2020-05-062-89/+123
| | | | | | | 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>
* llvmpipe: add a max samples define set to 4.Dave Airlie2020-05-061-0/+1
| | | | | | | 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>
* llvmpipe: add multisample support to texture allocator.Dave Airlie2020-05-065-3/+14
| | | | | | | | | 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>
* util: add a resource wrapper to get resource samplesDave Airlie2020-05-061-0/+5
| | | | | | | 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>
* llvmpipe: add samples support to image jitDave Airlie2020-05-066-2/+28
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add num_samples/sample_stride support to jit texturesDave Airlie2020-05-066-1/+32
| | | | | | | | 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>
* draw: add support for num_samples + sample_stride to the image pathsDave Airlie2020-05-067-9/+36
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* draw: introduce sampler num samples + stride membersDave Airlie2020-05-069-6/+31
| | | | | | | | 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>
* gallivm/nir: add multisample image operationsDave Airlie2020-05-061-0/+6
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* gallivm/nir: add multisample support to image sizeDave Airlie2020-05-061-0/+3
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* gallivm/nir/tgsi: add multisample texture sampling.Dave Airlie2020-05-062-1/+13
| | | | | | | | | 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>