aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* radv: cleanup radv_CreateInstance()Samuel Pitoiset2020-05-061-35/+22
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4806>
* llvmpipe: enable ARB_sample_shadingDave Airlie2020-05-068-53/+103
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add min samples support to the fragment shader.Dave Airlie2020-05-062-27/+82
| | | | | | | This isn't enabled yet until the state gets hooked up Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: enable GL_ARB_shader_texture_image_samplesDave Airlie2020-05-064-37/+63
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* gallivm/nir: hooks up texture samples queriesDave Airlie2020-05-061-3/+21
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* gallivm/sample: add num samples query for txqs (v2)Dave Airlie2020-05-064-0/+9
| | | | | | | v2: add false to the existing users (Roland) Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: enable 4x sample MSAA + texture multisampleDave Airlie2020-05-064-385/+37
| | | | | | | | This enables proper support for 4xMSAA and for texture mulitsample extension. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* drisw: add multisample support to sw dri layer.Dave Airlie2020-05-061-1/+31
| | | | | | | | This allocates the msaa resources like the dri2 layer and adds the flushes Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: don't choose pixel centers for multisampleDave Airlie2020-05-062-2/+4
| | | | | | | | Don't pick the pixel centers for multisample rendering, fix the setup program. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: choose correct position for multisampleDave Airlie2020-05-061-7/+8
| | | | | | | | For multisample we don't want pixel centers at this stage, so don't add them in for that case. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: choose multisample rasterizer functions per triangle (v2)Dave Airlie2020-05-061-21/+41
| | | | | | | | | This just picks the correct cmds to add to the scene. v2: drop using 32-bit ms (Roland) Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: generate multisample triangle rasterizer functions (v2)Dave Airlie2020-05-064-3/+142
| | | | | | | | | | | | | 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: fixup multisample coverage masks for covered tilesDave Airlie2020-05-062-2/+10
| | | | | | | For fully covered tiles just pass in the filled out mask. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: build 64-bit coverage mask in rasterizerDave Airlie2020-05-061-2/+23
| | | | | | | | This adds the logic to build the per-sample masks at the lowest level of the rasterizer block hierarchy Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* llvmpipe: add fixed point sample positions to scene.Dave Airlie2020-05-062-0/+9
| | | | | | | These will be used in the rasterizer to generate the coverage masks Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
* 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>