aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
...
* freedreno: Deduplicate ringbuffer macros with computerator/fdperfEric Anholt2020-05-081-139/+0
| | | | | | They're sugar around freedreno_ringbuffer.h, so put them there and reuse them. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4957>
* freedreno,tu: Don't request fragcoord components not being read.Hyunjun Ko2020-05-086-36/+24
| | | | | | | | | | | | | | | | | v1. Replace the existed bool type with new bitfield and edit register files to take a mask instead of duplicating codes to do masking. v2. Use fragcoord_compmask != 0 instead of fragcoord_compmask > 0 since it represents a bitfield. Tested with dEQP-VK.glsl.builtin_var.simple.fragcoord_xyz/w dEQP-GLES2.functional.shaders.builtin_variable.fragcoord_xyz/w Closes: #2680 Signed-off-by: Hyunjun Ko <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4723>
* st/wgl: allocate and resolve msaa-texturesErik Faye-Lund2020-05-071-6/+79
| | | | | | | | | | | | | | LLVMpipe recently got the ability to render to MSAA-surfaces, but in order for this to work on Windows, we need to allocate a separate MSAA resource and resolve using a blit before we can display it. Without this, we end up always displaying the first sample instead of the resolved result. Acked-by: Dave Airlie <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4926>
* st/wgl: pass st_context_iface into stw_st_framebuffer_present_lockedErik Faye-Lund2020-05-073-5/+8
| | | | | | | | | We're going to need this to be able to resolve MSAA buffers. Acked-by: Dave Airlie <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4926>
* radeonsi: Fix omitted flush when moving suballocated textureBlaž Tomažič2020-05-073-6/+16
| | | | | | | Fixes: 5e805cc74bc52f97de8f6308fc06bc96623e7e09 "radeonsi: flush the context after resource_copy_region for buffer exports" Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4925>
* amd: unify code for overriding offset and stride for imported buffersMarek Olšák2020-05-071-30/+13
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
* ac/surface,radeonsi: move the set/get_umd_metadata code into ac_surface.cMarek Olšák2020-05-071-147/+9
| | | | | | | | | The indentation is on purpose. The whole file will be reindented to this code style some other time. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
* ac/surface,radeonsi: move the set/get_bo_metadata code to ac_surface.cMarek Olšák2020-05-076-218/+95
| | | | | | | | | The indentation is on purpose. The whole file will be reindented to this code style some other time. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
* amd: assume HTILE is always rb/pipe_aligned, remove ac_surface.u.gfx9.htileMarek Olšák2020-05-073-12/+12
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
* amd: assume CMASK is always rb/pipe_aligned, remove ac_surface.u.gfx9.cmaskMarek Olšák2020-05-072-10/+10
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
* amd: remove duplicated definitions from amdgpu_drm.hMarek Olšák2020-05-073-16/+0
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
* 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>