summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* meson: remove -DGALLIUM_SOFTPIPE from st/osmesaDylan Baker2019-10-011-1/+0
| | | | | | | | It's unused here, and undefined in scons. It is used in targets/osmesa, but it's properly defined there already. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* haiku: fix Mesa buildKen Mays2019-10-013-28/+18
| | | | | | | | | | | | | | | | | | | | 1. The hgl.c file is a read-only file versus read-write. Ref: src/gallium/state_trackers/hgl/hgl.c 2. I've included the Haiku-specific patches I used to get a successful build of Mesa 19.1.7 on Haiku using the meson/ninja build procedure. Shows "[764/764] linking target ... libswpipe.so" at build completion. v2: Remove autotools files (Eric) v3: Update the patch Reported-by: Ken Mays <[email protected]> Tested-by: Ken Mays <[email protected]> CC: [email protected] Reviewed-by: Alexander von Gluck IV <[email protected]>
* iris: Enable EXT_demote_to_helper_invocationCaio Marcelo de Oliveira Filho2019-09-301-0/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: Add PIPE_CAP_DEMOTE_TO_HELPER_INVOCATIONCaio Marcelo de Oliveira Filho2019-09-303-0/+5
| | | | | | | | | | | | To enable EXT_demote_to_helper_invocation: This extension adds a "demote" keyword that is similar to "discard" but only suppresses subsequent writes and outputs to the framebuffer, and does not terminate the execution of the invocation. For the remainder of the execution, the invocation is "demoted" to act like a helper invocation. Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Fix iris_rebind_buffer() for VBOs with non-zero offsets.Kenneth Graunke2019-09-301-2/+6
| | | | | | | | We can't just check for the BO base address, we need to check for the full address including any offset we may have applied. When updating the address, we need to include the offset again. Fixes: 5ad0c88dbe3 ("iris: Replace buffer backing storage and rebind to update addresses.")
* ac: add ac_build_image_get_sample_count from radeonsiMarek Olšák2019-09-301-17/+7
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* tgsi_to_nir: handle PIPE_FORMAT_NONE in image opcodesMarek Olšák2019-09-301-0/+3
| | | | | | radeonsi doesn't use the format and internal shaders don't set it. Reviewed-By: Timur Kristóf <[email protected]>
* meson: gallium media state trackers require libdrm with x11Dylan Baker2019-09-304-8/+14
| | | | | | | | v2: - update copyright year in all changed files - rebase on master Cc: 19.1 19.2 <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* iris: Disable CCS_E for 32-bit floating point textures.Kenneth Graunke2019-09-301-1/+23
| | | | | | | | | | | | | | | | | | | | | A while back, Michael Larabel noticed that Paraview's Wavelet Volume case runs significantly slower on iris than i965. It turns out this is because we enable CCS_E for 32-bit floating point formats, while i965 disables it, with an oblique comment saying that we benchmarked it (on what exactly?) and determined that it was a loss. Paraview uses both R32_FLOAT and R32G32B32A32_FLOAT, and I observed large framerate drops when enabling CCS_E for either format. However, several other benchmarks (Aztec Ruins, many Synmark cases) use 16-bit floating point formats, with no apparent ill effects. So, disable compression for 32-bit float formats for now, but leave it enabled for 16-bit float formats as they seem to be working fine. Improves performance in Paraview's Wavelet Volume test by 62% on a Skylake GT4e. Fixes: 3cfc6a207bd ("iris: Fill out res->aux.possible_usages")
* radeonsi/gfx10: fix corruption for chips with harvested TCCsMarek Olšák2019-09-301-2/+6
| | | | | Cc: 19.2 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radeonsi/gfx10: fix L2 cache rinse programmingMarek Olšák2019-09-301-5/+17
| | | | | Cc: 19.2 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* etnaviv: fix bitmask typoEric Engestrom2019-09-301-1/+1
| | | | | | Fixes: d92689c46f0d2da05ae6 ("etnaviv: nir: add native integers (HALTI2+)") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* nouveau: set lower_sub = trueDaniel Schürmann2019-09-303-6/+2
| | | | | | Subtractions are already implemented as additions anyway. Reviewed-by: Connor Abbott <[email protected]>
* vc4: Enable the nir_opt_algebraic_late() pass.Eric Anholt2019-09-301-0/+15
| | | | | | | | | | Upcoming changes to sub optimization will make this pass required. Over the course of that series, we see uniforms +.46%, instructions -.24% (seems like a fine tradeoff -- uniforms are 1/2 the size of instructions as far as cache occupancy) Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* scons: Fix MSYS2 Mingw-w64 build.pal10002019-09-291-2/+2
| | | | | | | | | | | | | | | | Reviewed-by: Jose Fonseca <[email protected]> This patch is based on https://github.com/msys2/MINGW-packages/blob/28e3f85e09b6947ea80036c49f6c38f1394f93ca/mingw-w64-mesa/link-ole32.patch but with tweaks to avoid MSVC build break when applied. v2: Create Mingw platform alias pointing to windows host platform define to avoid spurious crosscompilation; v3: Fix obviously wrong compiler flags for swr driver; v4: Update original patch URL because it has been relocated; v5: Don't bother patching autools stuff as it's not used by MSYS2 Mingw-w64 build and it's days are numbered anyway; v6: After Mingw posix flag fix in 295851eb things are far simpler as we don't need more linking of uuid, ole32, version and shell32 than what is already in place.
* lima: set uniforms_address lower bits properlyVasily Khoruzhick2019-09-281-0/+8
| | | | | | | | | | | | | | | | | | | | Looks like blob uses following values for uniforms buffer: 0 for 8 bytes 1 for 16 bytes 2 for 24 bytes 2 for 32 bytes 3 for 40 bytes 3 for 48 bytes 3 for 56 bytes 3 for 64 bytes 4 for 72 bytes It all looks like log2(size / 8) rounded up, so let's do the same. Fixes: 931fc2a7b3f9("lima: do not set the PP uniforms address lowest bits") Reviewed-by: Icenowy Zheng <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* etnaviv: nir: fix gl_FragDepthJonathan Marek2019-09-281-3/+17
| | | | | | | Fixes the following piglit test: fragdepth_gles2 (for ETNA_MESA_DEBUG=nir) Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: disable earlyZ when shader writes fragment depthJonathan Marek2019-09-283-3/+8
| | | | | | | Fixes the following piglit test: fragdepth_gles2 Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: make lower_alu easier to followJonathan Marek2019-09-281-32/+36
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: remove extra allocation for shader codeJonathan Marek2019-09-281-1/+1
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: remove "options" structJonathan Marek2019-09-282-41/+24
| | | | | | | It just makes thing more complicated for no reason. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: use store_deref instead of store_outputJonathan Marek2019-09-282-70/+59
| | | | | | | Allows some simplification. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: add native integers (HALTI2+)Jonathan Marek2019-09-285-34/+170
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* qetnaviv: nir: use new immediates when possibleJonathan Marek2019-09-281-1/+21
| | | | | | | | | Note it can still be improved a bit: * Use alu swizzle to determine if src is scalar * Take into account new immediates in the multiple uniform src lowering Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: set num_components for inputs/outputsJonathan Marek2019-09-281-3/+3
| | | | | | | | | This can improve performance by allowing the LAST_VARYING_2X bit to be set when possible (and possibility more benefits on HALTI5 where the number of components is set for each varying). Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: allocate contiguous components for LOAD destinationJonathan Marek2019-09-281-8/+53
| | | | | | | | | LOAD starts reading into the first enabled destination component, and doesn't skip disabled components, so we need to allocate a destination with contiguous components. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: nir: fix gl_FrontFacingJonathan Marek2019-09-283-1/+9
| | | | | | | | | | Only invert front facing when glFrontFace is GL_CW. Fixes following deqp test: dEQP-GLES2.functional.shaders.builtin_variable.frontfacing Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* lima: do not set the PP uniforms address lowest bitsIcenowy Zheng2019-09-281-1/+0
| | | | | | | | | | | | | | | | | | The PP uniforms address register in render state is not a direct pointer to the uniforms storage -- instead, it points to an one-item array, and the array item is the real pointer to the uniforms storage. This register reuses some of its LSBs as a size field. Currently the size is set according to the length of the real uniforms storage. However, as the register itself contains only a pointer to the one-item array, the size field should be set to the length of the one-item array and subtract it by 1, which means a fixed value of 0. That means we can just omit it now. Test shows this should be the correct approach to set this register. Signed-off-by: Icenowy Zheng <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]>
* etnaviv: support ARB_framebuffer_objectChristian Gmeiner2019-09-271-0/+1
| | | | | | | | Passes most of piglit's tests regarding arb_framebuffer_object and unlocks some more piglit tests. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: etna_resource_copy_region(..): drop assertChristian Gmeiner2019-09-271-3/+0
| | | | | | | | | We are using util_resource_copy_region(..) as fallback which supports different formats for src and dst. Improves the experience when running deqp or piglit with a debug build. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* meson: Link xvmc with libxvDylan Baker2019-09-271-3/+7
| | | | | | | | | | | Prior to xvmc 1.0.12 libxvmc incorrectly required libxv, but that was fixed. This results in compilation failures for the gallium xvmc tracker and tools. This patch fixes that by explicitly linking to libxv. Fixes: 22a817af8a89eb3c762fc3e07b443a3ce37d7416 ("meson: build gallium xvmc state tracker") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1844 Reviewed-by: Adam Jackson <[email protected]>
* meson: Try finding libxvmcw via pkg-config before using find_libraryDylan Baker2019-09-271-2/+7
| | | | | | | | | | | | This fixes cross compiling issues, because pkg-config is less likely to get the wrong libs. v2: - Fix typo in comment Fixes: 22a817af8a89eb3c762fc3e07b443a3ce37d7416 ("meson: build gallium xvmc state tracker") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/939 Reviewed-by: Adam Jackson <[email protected]>
* iris: Only resolve for image levels/layers which are actually in use.Kenneth Graunke2019-09-262-17/+12
| | | | There's no need to resolve everything.
* lima/ppir: add NIR pass to split varying loadsVasily Khoruzhick2019-09-265-0/+127
| | | | | | | | | | | | | | | NIR may emit a single instrinsic to load several packed varyings, but that's suboptimal for Utgard PP for several reasons: - varyings that are used as sampler inputs can be passed using pipeline register with increased precision - we have small number of regs, so using a vec4 regs for storing two vec2 varyings increases reg pressure. Add NIR pass to split a single load into several loads and utilize it in lima. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* freedreno/a3xx: Mostly fix min-vs-mag filtering decisions on non-mipmap tex.Eric Anholt2019-09-261-5/+12
| | | | | | | | | This is based on the fix I used for the same problem on V3D. In this case, it fixes all but the the dEQP-GLES2.functional.texture.filtering.2d.*_npot cases of dEQP-GLES2.functional.texture.filtering.2d.*'s failures. Acked-by: Rob Clark <[email protected]>
* lima: support rectangle textureIcenowy Zheng2019-09-264-3/+9
| | | | | | | | | | | | | | As Vasily discovered, the bit 7 of the word 1 of the texture descriptor is set when reloading the framebuffer, to use framebuffer-based offset rather than normalized one. This bit also works for regular textures to enable accessing with non-normalized offset. Add support for rectangle texture by setting this bit for PIPE_TEXTURE_RECT. Suggested-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Icenowy Zheng <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]>
* amd/common: Introduce ac_get_fs_input_vgpr_cnt.Timur Kristóf2019-09-261-40/+3
| | | | | | | | | | | Add a function called ac_get_fs_input_vgpr_cnt which will return the number of input VGPRs used by an AMD shader. Previously, radv and radeonsi had the same code duplicated, but this commit also allows them to share this code. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* freedreno/a6xx: Move instrlen and obj_start writes to fd6_emit_shaderKristian H. Kristensen2019-09-251-32/+44
| | | | | | Consolidate a few more generic shaders setup regs in fd6_emit_shader. Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Emit const and texture state for HS/DS/GSKristian H. Kristensen2019-09-254-8/+74
| | | | Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/ir3: Add HS/DS/GS to shader key and cacheKristian H. Kristensen2019-09-252-6/+31
| | | | Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Add generic program stateobj support for HS/DS/GSKristian H. Kristensen2019-09-254-19/+75
| | | | | | | This add generic stage state setup for HS/DS/GS to the program state object. Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno: Move fs functions after geometry pipeline stagesKristian H. Kristensen2019-09-251-10/+10
| | | | | | Let's try to always order the stages in the pipeline order. Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno: Add state binding functions for HS/DS/GSKristian H. Kristensen2019-09-252-1/+31
| | | | Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno: Rename vp and fp to vs and fs in fd_program_stateobjKristian H. Kristensen2019-09-2516-104/+104
| | | | | | | | We're using vs and fs now, and adding hs, ds and gs soon. It's confusing enough that we have both DS/TCS and HS/TES. At least for VS and FS there doesn't have to be multiple names. Signed-off-by: Kristian H. Kristensen <[email protected]>
* freedreno/a6xx: Factor out const state setupKristian H. Kristensen2019-09-251-27/+20
| | | | | | We'll be sharing this logic for new shader stages soon. Signed-off-by: Kristian H. Kristensen <[email protected]>
* st/nine: Ignore D3DSIO_RET if it is the last instruction in a shaderDanylo Piliaiev2019-09-251-1/+7
| | | | | | | | | | | | | | RET as a last instruction could be safely ignored. Remove it to prevent crashes/warnings in case underlying driver doesn't implement arbitrary returns. A better way would be to remove the RET after the whole shader is parsed which will handle a possible case when the last RET is followed by a comment. CC: <[email protected]> Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* lima/ppir: Add various varying fetch sources to disassemblerAndreas Baierl2019-09-251-23/+50
| | | | | Signed-off-by: Andreas Baierl <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* clover: eliminate "ignoring attributes on template argument" warningKarol Herbst2019-09-251-1/+10
| | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* clover/codegen: remove unused get_symbol_offsets functionKarol Herbst2019-09-251-12/+0
| | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* clover/llvm: remove harmful std::move callKarol Herbst2019-09-251-1/+1
| | | | | | | | both clang and gcc warn with: "moving a local object in a return statement prevents copy elision" Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>