summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* st/dri: add 32-bit RGBX/RGBA formatsMarek Olšák2017-07-132-12/+65
| | | | | | | | | | | | | | | | | | Add support for 32-bit RGBX/RGBA formats which are required for Android. The original patch (commit ccdcf91104a5) was reverted (commit c0c6ca40a25e) in mesa as it broke GLX resulting in swapped colors. Based on further investigation by Chad Versace, moving the RGBX/RGBA configs to the end is enough to prevent breaking GLX. The handling of RGBA/RGBX in dri_fill_st_visual is a fix from Marek Olšák. Cc: Eric Anholt <[email protected]> Cc: Mauro Rossi <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* swr/rast: Fix use of KNL-only intrinsics in SKX buildTim Rowley2017-07-133-6/+6
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Fix build warnings when using the Intel compilerTim Rowley2017-07-131-1/+1
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: SIMD16 Frontend - Fix USE_SIMD16_FRONTEND buildTim Rowley2017-07-134-12/+25
| | | | | | | Previous check-ins without testing with USE_SIMD16_FRONTEND have introduced regressions. This fixes the build, not the regressions. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Removing unneeded MSVC warning pragmaTim Rowley2017-07-131-3/+0
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Add support for read-only render targetsTim Rowley2017-07-132-4/+10
| | | | | | | Core will ensure hot tiles are loaded for read and write render targets, and will skip all output merger for read-only render targets. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Support render target mask instead of render target countTim Rowley2017-07-137-49/+85
| | | | | | WIP to support read-only render targets. Reviewed-by: Bruce Cherniak <[email protected]>
* radeonsi/gfx9: fix crash building monolithic merged ES-GS shaderNicolai Hähnle2017-07-131-3/+6
| | | | | | | | | | | Forwarding from the ES prolog to the ES just barely exceeds the current maximum array size when 16 vertex attributes are used. Give it a decent bump to account for merged shaders having up to 32 user SGPRs. Fixes a crash in GL45-CTS.multi_bind.draw_bind_vertex_buffers. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* nv50/ir: fix threads calculation for non-compute shadersIlia Mirkin2017-07-121-5/+9
| | | | | | | | | | We were using the "cp" union fields, which are only valid for compute shaders. The threads calculation affects the available GPRs, so just pick a small number for other shader types to avoid limiting available registers. Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* freedreno/ir3: fix load_front_face conversionIlia Mirkin2017-07-121-6/+3
| | | | | | | | | | | | | | The comments are correct - we get -1 and 0. However by adding 1, we convert this into 0,1. This mostly works for conditionals, but when negated, this will yield the wrong result. Instead just negate the values (as they are backwards -- -1 means back instead of front). Fixes tests/shaders/glsl-fs-frontfacing-not.shader_test and dEQP-GLES3.functional.shaders.builtin_variable.frontfacing on A530. The latter also tested on A306 by Rob Clark. Signed-off-by: Ilia Mirkin <[email protected]>
* swr: Add path to draw directly from client memory without copy.Bruce Cherniak2017-07-125-11/+51
| | | | | | | | | | | | | | | | If size of client memory copy is too large, don't copy. The draw will access user-buffer directly and then block. This is faster and more efficient than queuing many large client draws. Applications that still use large client arrays benefit from this. VMD is an example. The threshold for this path defaults to 32KB. This value can be overridden by setting environment variable SWR_CLIENT_COPY_LIMIT. v2: Use #define for default value, rather than hard-coded constant. Reviewed-by: Tim Rowley <[email protected]>
* swr: Move environment config options into separate function.Bruce Cherniak2017-07-121-26/+34
| | | | | | | | Moved reading of environment config options out of swr_create_screen_internal, into a separate swr_validate_env_options. This is to keep from cluttering create_screen. Reviewed-by: Tim Rowley <[email protected]>
* swr: Remove hard-coded constant and "todo" comment.Bruce Cherniak2017-07-121-1/+2
| | | | | | | | Removed the hard-coded constant in favor of a #define. Also removed TODO comment. The constant value doesn't need an environment configurable option. Reviewed-by: Tim Rowley <[email protected]>
* Android: Fix vc4 build since XML changes.Rob Herring2017-07-121-1/+1
| | | | | | | | | | | | | | Since commit 7f80a9ff1312 ("vc4: Introduce XML-based packet header generation like Intel's."), the vc4 build on Android is broken: out/target/product/linaro_x86_64/gen/STATIC_LIBRARIES/libmesa_broadcom_genxml_intermediates/broadcom/cle/v3d_packet_v21_pack.h:12:10: fatal error: 'v3d_packet_helpers.h' file not found external/mesa3d/src/gallium/drivers/vc4/vc4_cl_dump.c:28:10: fatal error: 'vc4_packet.h' file not found The path of the generated header needs to be fixed since we build out of tree. Acked-by: Eric Anholt <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* st/mesa: add a winsys buffers list in st_contextCharmaine Lee2017-07-113-1/+12
| | | | | | | | | | | | | | | | | | | | | Commit a5e733c6b52e93de3000647d075f5ca2f55fcb71 fixes the dangling framebuffer object by unreferencing the window system draw/read buffers when context is released. However this can prematurely destroy the resources associated with these window system buffers. The problem is reproducible with Turbine Demo running with VMware driver. In this case, the depth buffer content was lost when the context is rebound to a drawable. To prevent premature destroy of the resources associated with window system buffers, this patch maintains a list of these buffers in the context, making sure the reference counts of these buffers will not reach zero until the associated framebuffer interface objects no longer exist. This also helps to avoid unnecessary destruction and re-construction of the resources associated with the framebuffer. Fixes VMware bug 1909807. Reviewed-by: Brian Paul <[email protected]>
* vc4: Set shareable BOs as T tiled if possibleEric Anholt2017-07-124-13/+182
| | | | | | | | | | | | | | | | | | | | | | | | X11 and GL compositor performance on VC4 has been terrible because of our SHARED-usage buffers all being forced to linear. This swaps SHARED && !LINEAR buffers over to being tiled. This is an expected win for all GL compositors during rendering (a full copy of each shared texture per draw call), allows X11 to be used with decent performance without a GL compositor, and improves X11 windowed swapbuffers performance as well. It also halves the memory usage of shared buffers that get textured from. The only cost should be idle systems with a scanout-only buffer that isn't flagged as LINEAR, in which case the memory bandwidth cost of scanout goes up ~25%. This implements the EGL_EXT_image_dma_buf_import_modifiers extension, supporting the VC4 T_TILED modifier. v2: Added modifier support to resource creation/import, and advertisement (by daniels). v3: Fix old-kernel fallback path, fix compiler error and warnings, and comment touchups (by anholt). Reviewed-by: Daniel Stone <[email protected]>
* vc4: Use vc4_setup_slices for resource importEric Anholt2017-07-121-33/+19
| | | | | | | | | Rather than open-coding populating the first slice inside resource import, use vc4_setup_slices to do it for us. v2: Rebase on VC4_DEBUG=surf change Reviewed-by: Daniel Stone <[email protected]>
* vc4: Make the miptree debug code available under VC4_DEBUG=surfEric Anholt2017-07-123-5/+6
| | | | | | I kept flipping the bool on for debug, so let's just make it available. Reviewed-by: Daniel Stone <[email protected]>
* vc4: Switch back to using a local copy of vc4_drm.h.Eric Anholt2017-07-122-2/+4
| | | | | | | | | | | Needing to get our uapi header from libdrm has only complicated things. Follow intel's lead and drop our requirement for it. Generated from the same commit mentioned in the README. v2: Update Android.mk as well, move vc4_drm.h reference for distcheck. Reviewed-by: Daniel Stone <[email protected]>
* vc4: Remove a stale comment.Eric Anholt2017-07-121-4/+0
| | | | | The kernel hasn't been synchronous in a couple of years, plus there was synchronization code right there.
* svga: whitespace, formatting fixes in svga_swtnl_backend.cBrian Paul2017-07-121-34/+45
|
* svga: whitespace, formatting fixes in svga_swtnl_draw.cBrian Paul2017-07-121-9/+9
|
* svga: whitespace, formatting fixes in svga_swtnl_state.cBrian Paul2017-07-121-19/+19
|
* svga: move comment, declaration in svga_init_shader_key_common()Brian Paul2017-07-121-6/+5
| | | | | | | put the comment before the relevant code. Move declaration of swizzle_tab var to where it's used. Reviewed-by: Charmaine Lee <[email protected]>
* draw: whitespace, formatting fixes in draw_vs_exec.cBrian Paul2017-07-121-47/+43
| | | | Trivial.
* draw: s/unsigned/enum tgsi_semantic/Brian Paul2017-07-122-3/+3
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* svga: fix texture swizzle writemaskingBrian Paul2017-07-111-0/+2
| | | | | | | | | | | | | | | Commit bfe1e7737a76e3b046 changed how texture swizzles are set up. This exposed a latent bug in the VMware driver: we were ignoring the texture instruction's writemask when applying the 0 and 1 swizzle terms. This wasn't caught by the Piglit texture swizzle test because it only exercises fixed function (no write masking). Fixes issues seen with ETQW apitrace. CC: <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* swr: build driver proper separate from rasterizerTim Rowley2017-07-115-39/+36
| | | | | | | | | | | | | | | | | | swr used to build and link the rasterizer to the driver, and to support multiple architectures we needed to have multiple versions of the driver/rasterizer combination, which needed to link in much of mesa. Changing to having one instance of the driver and just building architecture specific versions of the rasterizer gives a large reduction in disk space. libGL.so 6464 Kb -> 7000 Kb libswrAVX.so 10068 Kb -> 5432 Kb libswrAVX2.so 9828 Kb -> 5200 Kb Total 26360 Kb -> 17632 Kb Reviewed-by: Emil Velikov <[email protected]>
* swr: switch to using SwrGetInterface api tableTim Rowley2017-07-1110-65/+72
| | | | | | | | | Use the SWR rasterizer API through the table returned from SwrGetInterface rather than referencing the functions directly. This will allow us to move to a model of having the driver dynamically load the appropriate swr architecture library. Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: make SWR_VISIBLE attribute work for windowsGeorge Kyriazis2017-07-111-1/+1
| | | | | | Needed to expose SwrGetInterface Reviewed-by: Bruce Cherniak <[email protected]>
* svga: s/unsigned/enum tgsi_texture_type/Brian Paul2017-07-111-3/+4
| | | | | Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
* svga: s/unsigned/enum tgsi_swizzleBrian Paul2017-07-111-4/+4
| | | | | Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
* svga: s/unsigned/enum tgsi_interpolate_mode/Brian Paul2017-07-111-1/+2
| | | | | | | And s/unsigned/enum tgsi_interpolate_loc/ Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
* svga: s/unsigned/enum tgsi_file_type/Brian Paul2017-07-111-7/+7
| | | | | Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
* svga: s/unsigned/enum tgsi_semantic/Brian Paul2017-07-114-8/+10
| | | | | | | Makes gdb debugging a little nicer. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Neha Bhende <[email protected]>
* gallium: use "ull" number suffix to keep the QtCreator parser happyMarek Olšák2017-07-108-35/+35
| | | | | | | It can't parse "llu". Reviewed-by: Thomas Helland <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* svga: fix PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE valueBrian Paul2017-07-101-1/+4
| | | | | | | | | | | | This query is supposed to return the max texture buffer size/width in texels, not size in bytes. Divide by 16 (the largest format size) to return texels. Fixes Piglit arb_texture_buffer_object-max-size test. Cc: [email protected] Reviewed-by :Charmaine Lee <[email protected]>
* svga: fix breakage in create_backed_surface_view()Brian Paul2017-07-101-4/+3
| | | | | | | | This fixes a regression in some piglit tests since commit 5e5d5f1a2eb. I think I mis-resolved the merge conflict when cherry-picking that commit to master. Reviewed-by: Charmaine Lee <[email protected]>
* a5xx: fix condition for updating *_FS_OUTPUT_CNTLIlia Mirkin2017-07-091-1/+1
| | | | | | | | | | | The register values depend on the currently set program, so make sure to revalidate when the program changes. Fixes glsl-1.10-fragdepth as well as dEQP-GLES3.functional.shaders.fragdepth.compare.* Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* radv: add support for using addrlib max alignment.Dave Airlie2017-07-091-1/+1
| | | | | | | | Rather than using 64k, use what addrlib returns as the base alignment for vulkan allocations. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* a5xx: remove no-longer-accurate border color layout commentIlia Mirkin2017-07-081-32/+1
| | | | | | | | Better to just point at the bcolor_entry struct which has our current understanding encoded into it. Also add an assert to ensure that the struct remains the expected size. Signed-off-by: Ilia Mirkin <[email protected]>
* a5xx: fix border color for depth formatsIlia Mirkin2017-07-081-1/+5
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* a5xx: add border color clamping, add packed border color formatsIlia Mirkin2017-07-081-11/+59
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* a5xx: fix border colors for swizzled texture formatsIlia Mirkin2017-07-081-14/+14
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* a5xx: fix integer texture border colorsIlia Mirkin2017-07-081-4/+2
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* a5xx: fix primitive restartIlia Mirkin2017-07-082-12/+23
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* draw: handle more TGSI_SEMANTIC_COLOR indicesRoland Scheidegger2017-07-083-10/+27
| | | | | | | | | | | | | It could only handle indices 0/1, otherwise what happened was bad (accessing array out of bounds, no crash but kind of random). This is enough for the gl state tracker (primary/secondary color) but not enough for some other state trackers (d3d9 has no limits on the number of color interpolants). The complexity with color semantics are all due to the front/back mapping (2 outputs in the vs map to one input in the fs) so this isn't extended to indices > 1 - d3d9 has no use for back colors, therefore this isn't needed and still only 2 back colors can be handled correctly. Reviewed-by: Brian Paul <[email protected]>
* svga: adjust line subpixel position for HWv8Brian Paul2017-07-071-1/+1
| | | | | | | | | | | | | | | | This fixes two regressions on HWv8: Piglit gl-1.0-ortho-pos Piglit/glean fbo This was caused by commit c2b92dada076a "svga: clamp device line width to at least 1 to fix HWv8 line stippling" This also fixes two conform tests: Vertex Order and Polygon Face No Piglit/conform changes with HWv9 or later. VMware bug 1905053 Reviewed-by: Charmaine Lee <[email protected]>
* etnaviv: fix refcnt initialization in etna_screenAleksander Morgado2017-07-071-0/+1
| | | | | | | | | | | | | | | | | Despite being a member of the etna_screen struct, 'refcnt' is used by the winsys-specific logic to track the reference count of the object managed in a hash table. When the count reaches zero, the pipe screen is removed from the table and destroyed. Fix the logic by initializing the refcnt to 1 when screen created. This initialization is done in etna_screen_create(), to follow the same logic as in freedreno and virgl. Fixes: c9e8b49b885 ("etnaviv: gallium driver for Vivante GPUs") Cc: [email protected] Signed-off-by: Aleksander Morgado <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* a5xx: add support for rendering to RGB10A2_UNORM formatsIlia Mirkin2017-07-071-3/+3
| | | | Signed-off-by: Ilia Mirkin <[email protected]>