aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* llvmpipe: make sample position a global array.Dave Airlie2020-05-073-11/+12
| | | | | | | | | | | | | I messed this up and LLVM asserts on it. Use the gallivm struct wrappers to make it clearer. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2913 Reviewed-by: Erik Faye-Lund <[email protected]> Tested-by: Erik Faye-Lund <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4933>
* gallium/swr: Fix crashes in sampling codeJan Zielinski2020-05-073-0/+8
| | | | | | | | | Add missing functions used by the new sampling code in llvmpipe (num_samples and sample_stride) Reviewed-by: Krzysztof Raszkowski <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4947>
* panfrost: Don't trample on top of Bifrost-specific unionsTomeu Vizoso2020-05-071-20/+26
| | | | | | Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4944>
* panfrost: Add checksum BOs to batchTomeu Vizoso2020-05-071-2/+14
| | | | | | | | So they don't get released before the last frame finishes rendering. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4944>
* util/os_memory: never use os_memory_debug.hErik Faye-Lund2020-05-071-8/+0
| | | | | | | | | | | | | | | | This is currently broken hard, because this code is being used in more places that it used to be, and fixing that is prohibitively hard right now. This is far from ideal, as it leaves the same inconsistency in the EMBEDDED_DEVICE code-path. But that only used by VMWare, so it's probably better if they fix it, as they know their requirements better than we do. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2911 Fixes: 76f79db3f5d ("util: stop including files from mesa/main") Acked-by: Jose Fonseca <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4919>
* v3d: Include supported DXT formats to enable s3tc/dxt extensionsJose Maria Casanova Crespo2020-05-071-0/+5
| | | | | | | | | | | | | | | | | | | | | DXT1_RGBA and sRGB variants of DXT[135] formats are enabled as valid format on V3D. Once all S3TC formats supported by V3C are enabled the following extensions become exposed by gallium. * GL_ANGLE_texture_compression_dxt3 * GL_ANGLE_texture_compression_dxt5, * GL_EXT_texture_compression_dxt1 * GL_EXT_texture_compression_s3tc * GL_S3_s3tc * GL_EXT_texture_compression_s3tc_srgb This enables 206 passing piglit test related to gl_compressed.*s3tc_dxt Cc: 20.0 20.1 <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4934>
* v3d: Fix swizzle in DXT3 and DXT5 formatsJose Maria Casanova Crespo2020-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Swizzles were ignoring the W component of the format DXT3_RGBA and DXT5_RGBA. This fixes 15 piglit tests: spec/!opengl 1.1/copyteximage 2d spec/!opengl 1.2/copyteximage 3d spec/arb_texture_compression/fbo-generatemipmap-formats/gl_compressed_rgba spec/arb_texture_compression/fbo-generatemipmap-formats/gl_compressed_rgba npot spec/arb_texture_compression/texwrap formats bordercolor-swizzled/gl_compressed_rgba, swizzled, border color only spec/arb_texture_compression/texwrap formats bordercolor/gl_compressed_rgba, border color only spec/arb_texture_cube_map/copyteximage cube spec/arb_texture_cube_map/copyteximage cube samples=2 spec/arb_texture_cube_map/copyteximage cube samples=4 spec/arb_texture_rectangle/copyteximage rect spec/arb_texture_rectangle/copyteximage rect samples=2 spec/arb_texture_rectangle/copyteximage rect samples=4 spec/ext_texture_array/copyteximage 2d_array spec/ext_texture_array/copyteximage 2d_array samples=2 spec/ext_texture_array/copyteximage 2d_array samples=4 Fixes: 469bbd8387d1 "broadcom/vc5: Move the formats table to per-V3D-version compile." Reviewed-by: Iago Toral Quiroga <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4934>
* clover/nir: Check the result of spirv_to_nirPierre Moreau2020-05-071-0/+5
| | | | | | | Fixes: deb04adf2ae ("clover: add support for passing kernels as nir to the driver") Signed-off-by: Pierre Moreau <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4901>
* virgl: Enable CAP_CLEAR_TEXTURE if host supports itElie Tournier2020-05-072-1/+3
| | | | | | Signed-off-by: Elie Tournier <[email protected]> Reviewed-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4345>
* virgl: implement ARB_clear_textureElie Tournier2020-05-074-0/+73
| | | | | | Signed-off-by: Elie Tournier <[email protected]> Reviewed-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4345>
* r600: Fix warning regarding mixing enums and unsigned in ?: expressionGert Wollny2020-05-071-1/+1
| | | | | | Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4939>
* r600: remove some unused variables to silence warningsGert Wollny2020-05-072-4/+0
| | | | | | Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4939>
* r600/sb: replace memset by using member initialization/assignmentGert Wollny2020-05-076-10/+45
| | | | | | | | Closes #2860 Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4939>
* r600: remove unused static functionsGert Wollny2020-05-071-199/+0
| | | | | | | | Related #2860 Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4939>
* r600: Annotate some case fallthroughsGert Wollny2020-05-075-19/+26
| | | | | | | | Also fix indentions where aproprate Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4939>
* freedreno/a6xx: enable tiled compressed texturesRob Clark2020-05-061-0/+3
| | | | | | | | I wasn't expecting this to be too useful, since compressed textures are already block based.. but gfxbench gl_fill says otherwise. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4868>
* freedreno/a6xx: compressed blit fixesRob Clark2020-05-061-4/+15
| | | | | | | | width/height are not necessarily aligned to block boundaries, so we need to round up. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4868>
* freedreno/a6xx: Set tfetch correctly for compressed formatsKristian H. Kristensen2020-05-061-4/+1
| | | | | | | The fetchsize is just the blocksize for compressed formats, which gets rid of the ASTC special cases add handles ETC1/2 as well. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4868>
* radeonsi: fix compilation of monolithic PSMarek Olšák2020-05-061-1/+2
| | | | | | | | | | | | | | | This was totally broken. Monolithic PS is only used if FBFETCH or interpolateAtSample are used. When the PS prolog was built, it overwrote ctx->main_fn. Discovered by @eefano. Fixes: 8832a884345686e6a8b2c0c8aa7515ad3f775b9e "radeonsi: move PS LLVM code into si_shader_llvm_ps.c" Closes: #2814 Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4918>
* tgsi_to_nir: translate non-vec4 image stores correctlyMarek Olšák2020-05-061-2/+5
| | | | | | | set the correct number of components for src data and the intrinsic Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4908>
* zink: lower b2b to b2iErik Faye-Lund2020-05-064-1/+67
| | | | | | | | | | | | | | | Zink requires 1-bit booleans, but this requirement was missed before b2b1s started getting automatically inserted. Let's lower these away, to avoid piglit regressions. Fixes the following piglits: - shaders@glsl-vs-if-bool - spec@!opengl 2.0@vertex-program-two-side Fixes: c217ee8d35f ("nir: Insert b2b1s around booleans in nir_lower_to") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2902 Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4903>
* llvmpipe: enable ARB_sample_shadingDave Airlie2020-05-065-4/+19
| | | | | 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-061-1/+1
| | | | | 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-062-14/+6
| | | | | | | | 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>