summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* freedreno/ir3: add a pass to lower tg4 to txl, enable gather on a4xxIlia Mirkin2017-11-258-5/+153
| | | | | | | | | | Unfortunately Adreno A4xx hardware returns incorrect results with the GATHER4 opcodes. As a result, we have to lower to 4 individual texture calls (txl since we have to force lod to 0). We achieve this using offsets, including on cube maps which normally never have offsets. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* nir: allow texture offsets with cube mapsIlia Mirkin2017-11-251-2/+13
| | | | | | | | | | GL doesn't have this, but some hardware supports it. This is convenient for lowering tg4 to plain texture calls, which is necessary on Adreno A4xx hardware. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* util: Fix disk_cache index calculation on big endianMatt Turner2017-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cache-test test program attempts to create a collision (using key_a and key_a_collide) by making the first two bytes identical. The idea is fine -- the shader cache wants to use the first four characters of a SHA1 hex digest as the index. The following program unsigned char array[4] = {1, 2, 3, 4}; int *ptr = (int *)array; for (int i = 0; i < 4; i++) { printf("%02x", array[i]); } printf("\n"); printf("%08x\n", *ptr); prints 01020304 04030201 on little endian, and 01020304 01020304 on big endian. On big endian platforms reading the character array back as an int (as is done in disk_cache.c) does not yield the same results as reading the byte array. To get the first four characters of the SHA1 hex digest when we mask with CACHE_INDEX_KEY_MASK, we need to byte swap the int on big endian platforms. Bugzilla: https://bugs.freedesktop.org/103668 Bugzilla: https://bugs.gentoo.org/637060 Bugzilla: https://bugs.gentoo.org/636326 Fixes: 87ab26b2ab35 ("glsl: Add initial functions to implement an on-disk cache") Reviewed-by: Emil Velikov <[email protected]>
* util: Add a SHA1 unit test programMatt Turner2017-11-252-1/+67
| | | | Reviewed-by: Emil Velikov <[email protected]>
* util: Fix SHA1 implementation on big endianMatt Turner2017-11-251-1/+2
| | | | | | | | | | | The code defines a macro blk0(i) based on the preprocessor condition BYTE_ORDER == LITTLE_ENDIAN. If true, blk0(i) is defined as a byte swap operation. Unfortunately, if the preprocessor macros used in the test are no defined, then the comparison becomes 0 == 0 and it evaluates as true. Fixes: d1efa09d342b ("util: import sha1 implementation from OpenBSD") Reviewed-by: Emil Velikov <[email protected]>
* util: Assume little endian in the absence of platform-specific handlingMatt Turner2017-11-251-0/+3
|
* mesa: shrink VERT_ATTRIB bitfields to 32 bitsMarek Olšák2017-11-2514-49/+59
| | | | | | There are only 32 vertex attribs now. Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove unused vertex attrib WEIGHTMarek Olšák2017-11-2511-27/+24
| | | | | | | | | | | | We don't support ARB_vertex_blend. Note that the attribute aliasing check for ARB_vertex_program had to be rewritten. vbo_context: 20344 -> 20008 bytes gl_context: 74672 -> 74616 bytes Reviewed-by: Ian Romanick <[email protected]>
* mesa: don't assign numbers to vertex attrib enums manuallyMarek Olšák2017-11-253-133/+133
| | | | | | I plan to remove one of them. Reviewed-by: Ian Romanick <[email protected]>
* gallium/hud: add HUD sharing within a context share groupMarek Olšák2017-11-254-14/+106
| | | | | | | This is needed for profiling multi-context applications like Chrome. One context can record queries and another context can draw the HUD. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: update the HUD interface for multiple contextsMarek Olšák2017-11-259-19/+22
| | | | | | | This is the boring subset of the following commit. All new parameters are optional. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: prevent a crash if the recording context is inactiveMarek Olšák2017-11-251-1/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: separate code for record context init/releaseMarek Olšák2017-11-252-16/+37
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: separate code for draw context init/releaseMarek Olšák2017-11-251-70/+111
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: don't use hud->pipe in hud_parse_env_varMarek Olšák2017-11-251-6/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: use cso_get_pipe_contextMarek Olšák2017-11-256-7/+8
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* cso: add cso_get_pipe_contextMarek Olšák2017-11-252-0/+5
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: pass pipe_context explicitly to most functionsMarek Olšák2017-11-255-64/+57
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: split hud_draw into 3 separate functionsMarek Olšák2017-11-256-79/+99
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/dri: remove dead code and incorrect comment around make_currentMarek Olšák2017-11-251-13/+0
| | | | | | | | | | Core Mesa already handles flushing based on ContextReleaseBehavior, so the comment is wrong. Also, old_st is always NULL, because unbind_context always precedes make_current. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/dri: clean up dri_unbind_contextMarek Olšák2017-11-251-3/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: expose all CB performance counters on StoneyMarek Olšák2017-11-251-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: handle imported textures with DCC robustlyMarek Olšák2017-11-251-1/+1
| | | | | | | now you can hack the driver to enable DCC for displayable textures and Glamor that doesn't enable that by default won't crash anymore. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: fix a typo in creating monolithic ES-GSMarek Olšák2017-11-251-1/+1
| | | | | | This has no effect because both occupy the same memory in a union. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't write undefined output channels to LDS in LSMarek Olšák2017-11-251-0/+3
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: use ac.lds for shared memoryMarek Olšák2017-11-253-5/+3
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: do 64-bit LDS loads recursivelyMarek Olšák2017-11-251-7/+9
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mapi: Teach es{1,2}api/ABI-check shared library names on CygwinJon Turney2017-11-242-8/+18
| | | | | | | | | | | Ideally we'd be able to get the library filename from libtool, but that doesn't seem to be a feature... Use of ${uname} is presumably ok here as we won't be running 'make check' if we are cross-compiling Signed-off-by: Jon Turney <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* Revert "radv: remove unnecessary memset() in radv_AllocateCommandBuffers()"Samuel Pitoiset2017-11-241-0/+3
| | | | | | | | | | | | | | This fixes two CTS regressions: - dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_primary - dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_secondary These two tests are part the mustpass lists, so presumably they are correct and my change was wrong. This reverts commit 0f68208f1d1d3b7b2963dab40e84c60212518692. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/winsys: improve error messages when the buffer list creation failedSamuel Pitoiset2017-11-241-3/+6
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/winsys: do not try to create a BO list with 0 buffersSamuel Pitoiset2017-11-241-3/+9
| | | | | | | | | | | | | | | | This happens when all BOs have the RADEON_FLAG_NO_INTERPROCESS_SHARING (DRM version >= 3.23) flag set. This flag is mainly used for reducing overhead on the userspace side because we don't have to put those BOs inside the list. Though, if the driver tries to create a list with 0 buffers inside it, libdrm returns -EINVAL and the app just crashes. This fixes a bunch of CTS dEQP-VK.sparse_resources.* fails (~100). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* i965/vec4: fix splitting of interleaved attributesIago Toral Quiroga2017-11-241-1/+6
| | | | | | | | | | | | | | | | | | | When we split an instruction that reads an uniform value (vstride 0) we need to respect the vstride on the second half of the instruction (that is, the second half should read the same region as the first). We were doing this already, but we didn't account for stages that have interleaved input attributes which also have a vstride of 0 and need the same treatment. Fixes the following on Haswell: KHR-GL45.enhanced_layouts.varying_locations KHR-GL45.enhanced_layouts.varying_array_locations KHR-GL45.enhanced_layouts.varying_structure_locations Reviewed-by: Matt Turner <[email protected]> Acked-by: Andres Gomez <[email protected]>
* etnaviv: Emit vertex buffers consecutivelyWladimir J. van der Laan2017-11-231-4/+4
| | | | | | | | | | | | | Vertex buffer legacy state is no longer picked up with new drawing commands. Change to use different cases depending on the number of vertex streams in the GPU specs. This results in slightly more compact state emission as well, on all vivantes. Signed-off-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* REVIEWERS: add Alexander von Gluck IV as a reviewer for HaikuEric Engestrom2017-11-231-0/+9
| | | | | | | | There's been some Haiku-related activity lately, so let's document who to cc on these patches. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Alexander von Gluck IV <[email protected]>
* genxml: fix assert guardsEric Engestrom2017-11-231-5/+5
| | | | | | | This removes a few hundred warnings on debug builds with asserts off. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* meson: add variable for mapi_abi.py instead of going back up the treeEric Engestrom2017-11-235-4/+6
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: reorder subdirs to avoid directly including more than one levelEric Engestrom2017-11-233-2/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: fix strtof locale support checkEric Engestrom2017-11-231-1/+1
| | | | | | Fixes: d1992255bb29054fa5176 "meson: Add build Intel "anv" vulkan driver" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* r600: set DX10_CLAMP for compute shader tooRoland Scheidegger2017-11-231-2/+3
| | | | | | | | I really intended to set this for all shader stages by 3835009796166968750ff46cf209f6d4208cda86 but missed it for compute shaders (because it's in a different source file...). Reviewed-by: Dave Airlie <[email protected]>
* anv: flag batch & instruction BOs for captureLionel Landwerlin2017-11-222-2/+6
| | | | | | | | | | | | | When the kernel support flagging our BO, let's mark batch & instruction BOs for capture so then can be included in the error state. v2: Only add EXEC_CAPTURE if supported (Kristian) v3: Fix operator precedence issue (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv: setup BO flags at state_pool/block_pool creationLionel Landwerlin2017-11-227-22/+41
| | | | | | | | This will allow to set the flags on any anv_bo created/filled from a state pool or block pool later. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* r600/shader: Fix all warnings issed with "-Wall -Wextra"Gert Wollny2017-11-221-31/+36
| | | | | | | | | | | | - fix a number of -Wsign-compare warnings - fix two warnings for -Woverride-init because TGSI_OPCODE_CEIL == 83, and the according field was defined two times. [airlied: don't use -1 with unsigned type, fix whitespace] Signed-off-by: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: Emit EOP for more CF instruction typesGert Wollny2017-11-224-7/+16
| | | | | | | | | | | | | | | | | | | | So far on pre-cayman chipsets the CF instructions CF_OP_LOOP_END, CF_OP_CALL_FS, CF_OP_POP, and CF_OP_GDS an extra CF_NOP instruction was added to add the EOP flag, even though this is not actually needed, because all these instrutions support the EOP flag. This patch removes the fixup code, adds setting the EOP flag for the according instructions as well as others like CF_OP_TEX and CF_OP_VTX, and adds writing out EOP for this type of instruction in the disassembler. This also fixes a bug where shaders were created that didn't actually have the EOP flag set in the last CF instruction, which might have resulted in GPU lockups. [airlied: cleaned up a little] Signed-off-by: Gert Wollny <[email protected]> Cc: <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* meson: replace with_*dri with with_dri_platformDylan Baker2017-11-223-7/+3
| | | | | | | | This fixes the windows and macos stubs to be consistent with the *nix path. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: add logic to select apple and windows driDylan Baker2017-11-221-2/+14
| | | | | | | | | | | | This is still not fully correct (haiku and BSD is notably probably not correct), but Linux is not regressed and this should be correct for macOS and Windows. v2: - set the dri_platform to windows on Cygwin as well (Jon) v3: - Add a better todo for Hurd (Eric) Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Fix LLVM requires for radeonsiDylan Baker2017-11-221-2/+2
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: convert llvm option to tristateDylan Baker2017-11-222-25/+28
| | | | | | | This option has been acting as a strange sort of half-tri state anyway. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Convert platform to autoDylan Baker2017-11-222-2/+9
| | | | | | | | | This is necessary to support operating systems other than the *nix family (excluding macOS). For Linux nothing has changed, the defaults are still the same. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Remove duplicate _GNU_SOURCEDylan Baker2017-11-221-1/+0
| | | | | | | | There is one provided unconditionally, and one guarded by platform == linux. Remove the unconditional one. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Remove completed or irrelevant TODO commentsDylan Baker2017-11-221-15/+0
| | | | | | | | | These are all either done already, or are autotools specific. The misspelled gallium G3DVL is the autotools specific bit, meson is handling that via build_by_default. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>