summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* spirv: Drop a bogus assertJason Ekstrand2019-01-261-1/+0
| | | | | | | | | | This was valid back when the only valid types of pointers were uint32 and uvec2. Now that we're allowing more variety, it could be just about anything so we'll just drop the assert. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* nir: Allow SSBOs and global to aliasJason Ekstrand2019-01-261-1/+6
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* nir/validate: Allow array derefs of vectors for nir_var_mem_globalJason Ekstrand2019-01-261-1/+2
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* nir/lower_io: Add support for nir_var_mem_globalJason Ekstrand2019-01-261-0/+12
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* nir/lower_io: Add a 32 and 64-bit global address formatsJason Ekstrand2019-01-262-30/+123
| | | | | | These are simple scalar addresses. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* nir: Add load/store/atomic global intrinsicsJason Ekstrand2019-01-263-1/+39
| | | | | | | | | These correspond roughly to reading/writing OpenCL global pointers. The idea is that they just take a bare address and load/store from it. Of course, exactly what this address means is driver-dependent. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* st/nine: Enable debug info if NDEBUG is not setAxel Davy2019-01-2611-26/+26
| | | | | | | | | | We want to have debug info as well if using meson's debugoptimized when ndebug is off. v2: use u_debug functions that do something even if DEBUG is not set. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Immediately upload user provided texturesAxel Davy2019-01-261-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes regression caused by 42d672fa6a766363e5703f119607f7c7975918aa st/nine: Bind src not dst in nine_context_box_upload Before that patch, for user provided textures, when the texture was destroyed, the safety check for pending uploads, which according to the code "Following condition cannot happen currently", was flushing the queue and thus triggering the upload. After the patch, the texture destruction was delayed after the upload. However the user frees the texture buffer, as it thinks the texture released. Instead of reverting the faulty patch, this patch instead flushes the csmt queue right away after queuing the upload for this type of textures. This is more future-proof, as we may want to bind the surface for other reasons in the future. Signed-off-by: Axel Davy <[email protected]> Cc: 18.3 <[email protected]>
* i965: Always compile fp64 funcs when neededMatt Turner2019-01-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compilation of user-specified shaders with software fp64 works by compiling on demand an "fp64-funcs" shader implementing various fp64 operations and then linking it into the "user shader". In commit 64b8c86d37ebb1e1d286c69d642d52b7bcf051d3 Author: Timothy Arceri <[email protected]> Date: Thu Jan 17 17:16:29 2019 +1100 glsl: be much more aggressive when skipping shader compilation we changed the behavior of the shader cache to skip compilation earlier when we get a cache hit. After the aforementioned commit, compiling a user program using fp64 would store into the cache an entry for the fp64-funcs shader. Subsequent compilations of uncached user shaders using fp64 would fail in compile_fp64_funcs() after finding a cache entry for the fp64-funcs, but being unprepared to read from the cache. It's unclear to me how to retrieve the cached NIR of the fp64-funcs (if it even is cached), so just call _mesa_glsl_compile_shader() with force_recompile=true in order to ensure we generate the fp64-funcs successfully. Tested-by: Mark Janes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/compiler: Add a file-level description of brw_eu_validate.cMatt Turner2019-01-261-1/+13
| | | | | | Acked-by: Jose Maria Casanova Crespo <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* freedreno: add renderonly scanoutJonathan Marek2019-01-268-10/+66
| | | | | | | | | | This allows creating a fd_screen with a renderonly object which will be used to allocated scanout resources. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> [slight tweak to fix uninitialized 'prsc' in debug print] Signed-off-by: Rob Clark <[email protected]>
* freedreno/a2xx: fix unused variable warningRob Clark2019-01-261-1/+0
| | | | Signed-off-by: Rob Clark <[email protected]>
* tgsi: remove culldist semantic from docsTimothy Arceri2019-01-261-18/+0
| | | | | | The semantic was removed in e6d93893662d. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir_to_llvm: fix clamp shadow reference for more hardwareTimothy Arceri2019-01-261-1/+1
| | | | | | | | | | | Fixes the following piglit test on my VEGA and matches the behaviour in the tgsi backend. tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-clamp-z.shader_test Fixes: 625dcbbc4566 ("amd/common: pass address components individually to ac_build_image_intrinsic") Reviewed-by: Marek Olšák <[email protected]>
* gallium: Make sure we return is_unorm/is_snorm for compressed formats.Eric Anholt2019-01-255-24/+101
| | | | | | | | | | | | | | | The util helpers were looking for a non-void channels in a non-mixed format and returning its snorm/unorm state. However, compressed formats don't have non-void channels, so they always returned false. V3D wants to use util_format_is_[su]norm for its border color clamping workarounds, so fix the functions to return the right answer for these. This now means that we ignore .is_mixed. I could retain the is_mixed check, but it doesn't seem like a useful feature -- the only code I could find that might care is freedreno's blit, which has some notes about how things are wonky in this area anyway. Reviewed-by: <Roland Scheidegger [email protected]>
* gallium: Fix comment about possible colorspaces.Eric Anholt2019-01-251-1/+1
| | | | | | Two typos, and missing one of the colorspaces. Reviewed-by: <Roland Scheidegger [email protected]>
* gallium: Enable unit tests as actual meson unit tests.Eric Anholt2019-01-252-7/+9
| | | | | | | | These tests don't need swrast, so we can always enable them when build_tests is set. Most of them run to successful completion quickly (.9s on my SKL). Reviewed-by: <Roland Scheidegger [email protected]>
* mapi: print function declarations for shared glapiEmil Velikov2019-01-251-1/+1
| | | | | | | | | | | | | | | | | | | Earlier commit aimed to remove unneeded function declarations. Namely OpenGL entrypoints which are not applicable for OpenGLES* Although it did not consider the shared glapi which needs all, including hidden ones. Resulting in warning/errors like the following ../build/src/mapi/shared-glapi/glapi_mapi_tmp.h:26014:15: error: no previous prototype for ‘shared_dispatch_stub_1414’ [-Werror=missing-prototypes] This patch addressed that. Cc: Erik Faye-Lund <[email protected]> Reported-by: Eric Anholt <[email protected]> Fixes: 6148cce388f ("mapi: drop unneeded gl_dispatch_stub declarations") Signed-off-by: Emil Velikov <[email protected]> Acked-by: Eric Anholt <[email protected]>
* freedreno: limit tiling to PIPE_BIND_SAMPLER_VIEWRob Clark2019-01-251-0/+1
| | | | | | | | | | | | | 1ce5d757d04 dropped this limit.. which is probably the right thing to do. But it results in an extra tiled->linear blit for glReadPixels() (ie. dEQP/piglit) which is hitting some intermittent corruption (looks like cache) on a6xx, causing a lot of spurious fails. Since we are getting close to 19.0 branchpoint, re-instate this limit for now, until the blitter problems are resolved. Fixes: 1ce5d757d04 freedreno: core buffer modifier support Signed-off-by: Rob Clark <[email protected]>
* radv: fix computing number of user SGPRs for streamout buffersSamuel Pitoiset2019-01-251-0/+3
| | | | | | | Streamout buffers are emitted like push constants. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* android: fix build issues with libmesa_anv_gen* librariesTapani Pälli2019-01-251-0/+1
| | | | | | | We need this include path to find nir/nir_xfb_info.h. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* intel/batch-decoder: fix a vb end address calculationAndrii Simiklit2019-01-251-1/+3
| | | | | | | | | | According to the loop implementation (in 'ctx_print_buffer' function), which advances dword by dword over vertex buffer(vb), the vb size should be aligned by 4 bytes too. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109449 Signed-off-by: Andrii Simiklit <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/batch-decoder: fix vertex buffer size calculation for gen<8Andrii Simiklit2019-01-251-1/+1
| | | | | | | | | | | | | | | | It should be incremented by one according to how it is calculated by 'emit_vertex_buffer_state': "\#if GEN_GEN < 8 .BufferAccessType = step_rate ? INSTANCEDATA : VERTEXDATA, .InstanceDataStepRate = step_rate, \#if GEN_GEN >= 5 .EndAddress = ro_bo(bo, end_offset - 1), \#endif \#endif" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109449 Signed-off-by: Andrii Simiklit <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* meson/vdpau: add missing soversionEric Engestrom2019-01-252-2/+10
| | | | | | | | | | | | | | | This mirrors what autotools does in src/gallium/state_trackers/vdpau/Makefile.am and src/gallium/targets/vdpau/Makefile.am: VDPAU_MAJOR = 1 VDPAU_MINOR = 0 libvdpau_gallium_la_LDFLAGS = -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) Reported-by: Igor Gnatenko <[email protected]> Fixes: 68076b87474e7959c161 "meson: build gallium vdpau state tracker" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* anv: drop always-successful VkResultEric Engestrom2019-01-251-9/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/allocator: Avoid race condition in anv_block_pool_map.Rafael Antognolli2019-01-242-6/+27
| | | | | | | | | | | | | | | | | Accessing bo->map and then pool->center_bo_offset without a lock is racy. One way of avoiding such race condition is to store the bo->map + center_bo_offset into pool->map at the time the block pool is growing, which happens within a lock. v2: Only set pool->map if not using softpin (Jason). v3: Move things around and only update center_bo_offset if not using softpin too (Jason). Cc: Jason Ekstrand <[email protected]> Reported-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109442 Fixes: fc3f58832015cbb177179e7f3420d3611479b4a9 Reviewed-by: Jason Ekstrand <[email protected]>
* meson: Fix compiler checks for SWR with ICCDylan Baker2019-01-241-25/+5
| | | | | | | | | | | | This is a bit fragile, as the way this "fixes" the check is to move the one that we know is correct before the one that is incorrectly reported as working. In meson 0.49.1 (which isn't out yet) this is fixed that the incorrect check is reported as a failure. Fixes: e0b037d6979b266d4959c1e31746d4d19c941fdb ("meson: Build SWR driver") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109129 Acked-by: Eric Engestrom <[email protected]>
* meson: fix swr KNL buildDylan Baker2019-01-241-1/+1
| | | | | | | | | There's a typo in one of the #defines that breaks compilation. Fixes: e0b037d6979b266d4959c1e31746d4d19c941fdb ("meson: Build SWR driver") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109023 Reviewed-by: Eric Engestrom <[email protected]>
* gallivm: Return true from arch_rounding_available() if NEON is availableMatt Turner2019-01-242-2/+5
| | | | | | | | LLVM uses the single instruction "FRINTI" to implement llvm.nearbyint. Fixes the rounding tests of lp_test_arit. Bug: https://bugs.gentoo.org/665570 Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: Enable ASIMD/NEON on aarch64.Matt Turner2019-01-241-2/+9
| | | | | | | | NEON (now called ASIMD) is available on all aarch64 CPUs. Our code was missing an aarch64 path, leading to util_cpu_caps.has_neon always being false on aarch64. Reviewed-by: Eric Anholt <[email protected]>
* gallium: use put image shm2 path (v2)Dave Airlie2019-01-253-10/+22
| | | | | | | | | | | This fixes the drisw paths to use the new shm2 interface, so that we don't trigger the X server overflow checks when the x offset is non-zero. This just hides the versioning in drisw, and either passes the src_x or adds the offset fixup for the fallback path. Cc: <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* glx: add support for putimageshm2 path (v2)Dave Airlie2019-01-251-7/+23
| | | | | | | v2: pass x,0 in as the offset coords at glx level not earlier Cc: <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* mapi: remove machinery handling CSV filesEmil Velikov2019-01-241-74/+6
| | | | | | | We haven't have one in years, so just drop the code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* mapi: remove old, unused ES* generator codeEmil Velikov2019-01-242-113/+1
| | | | | | | | As of earlier commit, everyone has switched to the new script for the ES dispatch. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* mapi/es2api: remove no longer present entrypointsEmil Velikov2019-01-241-5/+0
| | | | | | | | | | | With the previous scripts API from the following was incorrectly exported. Drop them from the list, since they're no longer around. GL_EXT_blend_func_extended GL_EXT_texture_integer Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* mapi/es*api: remove GL_EXT_multi_draw_arrays entrypointsEmil Velikov2019-01-242-11/+2
| | | | | | | | Now we use the upstream XML file and a cleaner generator. Thus the symbols are no longer exported and we can drop them from this list. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* mapi/es*api: remove GL_OES_EGL_image entrypointsEmil Velikov2019-01-242-6/+0
| | | | | | | | As some point in the past we fixed the scripts so, these are no longer exported. Drop them from the list. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* Revert "mapi/new: sort by slot number"Emil Velikov2019-01-241-3/+0
| | | | | | | This reverts commit a1f5d9412cf7cacb3534635f6c2409fafbe6574e. We no longer needed to sort - it was meant only to ease compare against the old generated files.
* scons: wire the new generator for es1 and es2Emil Velikov2019-01-241-7/+21
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* meson: wire the new generator for es1 and es2Emil Velikov2019-01-244-6/+14
| | | | | | | | v2: use ${foo})_py naming (Dylan) v3: use symbolic name for genCommon.py Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]> (v2)
* autotools: wire the new generator for es1 and es2Emil Velikov2019-01-241-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output produced functionally identical, with the following changes: - A cosmetic: swapped ABI compatible types [ GLclampf -> GLfloat, etc ] - B cosmetic: renamed parameters [ zNear -> n, etc ] - C dropped extension entrypoints - invalid/incorrect To make things easier to validate, normalise both old/new headers run the sed patterns A, B and C to both sets. A s/\<GLclampf\>/GLfloat/g; s/\<GLclampx\>/GLfixed/g; s/\<GLvoid\>/void/g; B s/\ \* / */g; s/\<texture\>/target/g; s/\<plane\>/p/g; s/\<depth\>/d/g; s/\<modeAlpha\>/modeA/g; s/\<shader\>/program/g; s/\<obj\>/shaders/g; s/\<equation\>/eqn/g; s/\<param\>/data/g; s/\<params\>/data/g; s/\<buffers\>/buffer/g; s/\<src\>/mode/g; s/\<count\>/n/g; s/\<zNear\>/n/g; s/\<zFar\>/f/g; s/\<zfail\>/dpfail/g; s/\<zpass\>/dppass/g; s/\<buf\>/index/g; s/\<value\>/target/g; s/\<cap\>/target/g; s/\<maskNumber\>/index/g; s/\<srcRGB\>/sfactorRGB/g; s/\<dstRGB\>/dfactorRGB/g; s/\<srcAlpha\>/sfactorAlpha/g; s/\<dstAlpha\>/dfactorAlpha/g; s/\<primitiveMode\>/mode/g; s/\<primcount\>/instancecount/g; s/\<top\>/t/g; s/\<bottom\>/b/g; s/\<left\>/l/g; s/\<right\>/r/g; s/\<x\>/v0/g; s/\<y\>/v1/g; s/\<z\>/v2/g; s/\<w\>/v3/g; s/\<sfactor\>/mode/g; s/\<dfactor\>/dst/g; s/\<attribindex\>/bindingindex/g; s/\<internalFormat\>/internalformat/g; s/\<bufSize\>/bufsize/g; C glMultiDrawArraysEXT glMultiDrawElementsEXT glBindFragDataLocationEXT glGetTexParameterIivEXT glGetTexParameterIuivEXT glTexParameterIivEXT glTexParameterIuivEXT v2: - gl_dispatch_stub declarations are addressed with previous patch - the public_entries table is no longer generated Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* mapi/new: remove duplicate GLvoid/void substitutionEmil Velikov2019-01-241-1/+0
| | | | | | | | | | | | We already do it a few lines above - drop the duplicate. Note that for consistency sake, we keep the substitution since the GL API is a mixed bad - some use GLvoid while others a normal void. We might want to merge this back in GLVND. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* mapi/new: fixup the GLDEBUGPROCKHR typedef to the non KHR oneEmil Velikov2019-01-242-1/+1
| | | | | | | | | | This way we can reuse the latter, which is already present in the headers that we use. Thus we can drop the manual typedef we generate. We might want to merge this back in GLVND. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* mapi/new: don't print info we don't need for ES1/ES2Emil Velikov2019-01-241-4/+6
| | | | | | | | | | | | | | | | | | | There is no need for the noop functions, the public_stubs and public_entries table or table size defines. Remove those. Pretty much all of this is applicable to GLVND, although it requires preparatory work. v2: - python style fixes (Dylan) - use "gldispatch" instead of not "glesv1" "glesv2" - remove the public_entries table/array (Erik) v3: - use if == "gldispatch", instead of "in" (Kyle) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]> (v2)
* mapi/new: split out public_entries handlingEmil Velikov2019-01-241-0/+12
| | | | | | | | | | | | The only instance that requires the public_entries table is the dispatch library - split that into another function. We have to be careful with when undefining the guard, so split it out. We might want to merge this back in GLVND. Minor GLVND cleanup will be needed first. Signed-off-by: Emil Velikov <[email protected]>
* mapi/new: reinstate _NO_HIDDEN suffixes in the new generatorEmil Velikov2019-01-241-6/+6
| | | | | | | | | Strictly speaking we can rework the rest of the code so we do not need those. That said, this will require a series on it's own so let's carry this local quirk for now. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* mapi/new: use the static_data offsets in the new generatorEmil Velikov2019-01-241-1/+19
| | | | | | | | | | | | | | Otherwise the incorrect ones will be used, effectively breaking the ABI. Note: some entries in static_data.py list a suffixed API, while (for ES* at least) we expect the one w/o suffix. v2: - rework path handling (Dylan) - use else if chain (Erik) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* mapi/new: sort by slot numberEmil Velikov2019-01-241-0/+3
| | | | | Makes it easier to compare the newly generated header against the old one. Will be reverted after the transition.
* mapi/new: import mapi scripts from glvndEmil Velikov2019-01-242-0/+181
| | | | | | | | | | | | | | | | | | | | | | | Currently we have over 20 scripts that generate the libGL* dispatch and various other functionality. More importantly we're using local XML files instead of the Khronos provides one(s). Resulting in an increasing complexity of writing, maintaining and bugfixing. One fairly annoying bug is handling of statically exported symbols. Today, if we enable a GL extension for GLES1/2, we add a special tag to the xml. Thus the ES dispatch gets generated, but also since we have no separate notion of GL/ES1/ES2 static functions it also gets exported statically. This commit adds step one towards clearing and simplifying our setup. It imports the mapi generator from GLVND. 012fe39 ("Remove a couple of duplicate typedefs.") v2: use local genCommon.py Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* mapi: move genCommon.py to src/mapi/newEmil Velikov2019-01-246-6/+19
| | | | | | | | | | | The helper will also be used by the new Khronos gl.xml aware generator. v2: Move existing one, instead of duplicating it. v3: Correct genCommon.py references in meson [Erik] v4: Drop the file from the EGL EXTRA_DIST [Erik] Suggested-by: Kyle Brenneman <[email protected]> Signed-off-by: Emil Velikov <[email protected]>