summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* meson: Add generated files to non-shared glapiDylan Baker2017-10-271-0/+3
| | | | | Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* glapi: include generated headers without pathDylan Baker2017-10-273-4/+4
| | | | | | | This has been tested wtih make dist-check and with meson. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* osmesa: Include generated headers without pathDylan Baker2017-10-272-2/+4
| | | | | | | | This makes things much easier to ensure correctness with meson. Tested with make dist-check and with meson. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* meson: move gallium include declarations to srcDylan Baker2017-10-273-3/+2
| | | | | | | | These are used by non-gallium osmesa, so they need to be defined outside of the gallium subdirectory. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* meson: fix glprocs.h generatorDylan Baker2017-10-271-3/+3
| | | | | | | | There was a typo that causes the generated file to be called gl_procs.h instead. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* meson: rename all instances of xf86vm to xxf86vmDylan Baker2017-10-271-1/+1
| | | | | | | Because consistency Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* mesa: Accept GL_BACK in get_fb0_attachment with ARB_ES3_1_compatibility.Kenneth Graunke2017-10-271-0/+9
| | | | | | | | | | | According to the ARB_ES3_1_compatibility specification, glGetFramebufferAttachmentParameteriv is supposed to accept BACK, and it behaves exactly like BACK_LEFT. Fixes a GL error in GFXBench 5 Aztec Ruins. Cc: "17.3 17.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* gallium/os: fix align_malloc() / os_malloc_aligned() comment mix-upBrian Paul2017-10-271-1/+1
| | | | | os_free_aligned() is the counterpart to os_malloc_aligned(). Trivial.
* formatquery: use correct target check for IMAGE_FORMAT_COMPATIBILITY_TYPEAlejandro Piñeiro2017-10-271-1/+7
| | | | | | | | | | | | | | | | From the spec: "IMAGE_FORMAT_COMPATIBILITY_TYPE: The matching criteria use for the resource when used as an image textures is returned in <params>. This is equivalent to calling GetTexParameter" So we would need to return None for any target not supported by GetTexParameter. By mistake, we were using the target check for GetTexLevelParameter. v2: fix typo (GetTextParameter vs GetTexParemeter) on comment (Illia Mirkin) Reviewed-by: Antia Puentes <apuentes@igalia.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* meson: bring MESA_GIT_SHA1 in line with other build systemsEric Engestrom2017-10-271-2/+4
| | | | | | | | | | | | | | | | | | | | Meson's vcs_tag() uses the output of `git describe`, eg. 17.3-branchpoint-5-gfbf29c3cd15ae831e249+ Whereas the other build systems used a script that outputs only the sha1 of the HEAD commit, eg. fbf29c3cd1 Given that this information is used by printing it next to the version number, there's some redundancy here, and inconsistency between build systems. Bring Meson in line by making it use the same script, with the added advantage of now supporting the MESA_GIT_SHA1_OVERRIDE env var. Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
* buildsys: move file regeneration logic to the script itselfEric Engestrom2017-10-273-29/+12
| | | | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
* radv: allow to use a compute shader for resetting the query poolSamuel Pitoiset2017-10-271-7/+9
| | | | | | | | | | | | | Serious Sam Fusion 2017 uses a huge number of occlusion queries, and the allocated query pool buffer is greater than 4096 bytes. This slightly improves performance (tested in Ultra) from 117.2 FPS to 119.7 FPS (~+2%) on my RX480. This also improves Talos, from 69 FPS to 72/73 FPS (~+5%). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
* radv: make radv_fill_buffer() return the needed flush bitsSamuel Pitoiset2017-10-274-58/+57
| | | | | | | Only needed when the CS path is used. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
* wayland-egl: fix wayland cflagsEric Engestrom2017-10-271-1/+1
| | | | | | | | Fixes: 80bfff5c4f1d4d8c842a0 "wayland-egl: adds CFLAGS for wayland.egl.h include" Suggested-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
* vc4: fix release buildEric Engestrom2017-10-271-6/+6
| | | | | | | | | | | Mesa's DEBUG and assert's NDEBUG are not tied to each other, so we need to explicitly compile this code out. Fixes: 3df78928786134874eafa "vc4: Drop reloc_count tracking for debug asserts on non-debug builds." Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* i965: unref push_const_bo in intelDestroyContextTapani Pälli2017-10-271-0/+6
| | | | | | | | | | | | | | | | | | | | Valgrind shows that leak is caused by gen6_upload_push_constant, add unref push_const_bo per stage to destructor to fix this (like done for scratch_bo). ==10952== 144 bytes in 1 blocks are definitely lost in loss record 44 of 66 ==10952== at 0x4C30A1E: calloc (vg_replace_malloc.c:711) ==10952== by 0x8C02847: bo_alloc_internal.constprop.10 (brw_bufmgr.c:344) ==10952== by 0x8C425C4: intel_upload_space (intel_upload.c:101) ==10952== by 0x8C22ED0: gen6_upload_push_constants (gen6_constant_state.c:154) v2: remove if conditions, brw_bo_unreference handles NULL (Ken, Emil) Fixes: 24891d7c05 ("i965: Store per-stage push constant BO pointers.") Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: mesa-stable@lists.freedesktop.org
* i965: remove if conditions from scratch_bo unrefTapani Pälli2017-10-271-10/+6
| | | | | | | brw_bo_unreference handles NULL case Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* anv: Fix assert about source attrs.Kenneth Graunke2017-10-271-1/+1
| | | | | | | | | Asserting slot >= 2 made sense when the URB read offset was always 1 (pair of slots). Commit 566a0c43f0b9fbf5106161471dd5061c7275f761 made it possible to read from the VUE header in slot 0, by adjusting the offset to be 0. So, this assert is now bogus. Use the one from GL. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* anv: Drop URB entry output read handling in 3DSTATE_XS.Kenneth Graunke2017-10-271-26/+0
| | | | | | | | | Commit 566a0c43f0b9fbf5106161471dd5061c7275f761 started setting the 3DSTATE_SBE bit to override these values with the one calculated there. So, they're dead. Stop setting them. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* i965: Delete unused brw_vs_prog_data::nr_attributes field.Kenneth Graunke2017-10-272-2/+0
| | | | Reviewed-by: Matt Turner <mattst88@gmail.com>
* radeonsi: update hack for HTILE corruption in ARK: Survival EvolvedSamuel Pitoiset2017-10-276-13/+13
| | | | | | | | | | | | It appears that flushing the DB metadata is actually not sufficient since the driver uses the new VS blit shaders. This looks quite strange though, but it seems like we need to flush DB for fixing the corruption. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102955 Fixes: 69ccb9dae7 (radeonsi: use new VS blit shaders (VS inputs in SGPRs) Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* radv: add support for local bos. (v3)Dave Airlie2017-10-2611-22/+51
| | | | | | | | | | | | This uses the new kernel interfaces for reduced cs overhead, We only set the local flag for memory allocations that don't have a dedicated allocation and ones that aren't imports. v2: add to all the internal buffer creation paths. v3: missed some command submission paths, handle 0/empty bo lists. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* i965/miptree: Take an isl_format in render_aux_usageJason Ekstrand2017-10-265-27/+39
| | | | | | | | | | | Not all rendering matches the miptree format. We allow rendering to texture views so there are cases where it may not match. In those cases, our current scheme of just passing the value of ctx->sRGBEnabled isn't viable. Instead, just do what we do for texturing and pass the view format in directly. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Cc: mesa-stable@lists.freedesktop.org
* i965/blorp: Use more temporary isl_format variablesJason Ekstrand2017-10-261-8/+7
| | | | | Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Cc: mesa-stable@lists.freedesktop.org
* i965/blorp: Use blorp_to_isl_format for src_isl_format in blit_miptreesJason Ekstrand2017-10-261-1/+2
| | | | | Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Cc: mesa-stable@lists.freedesktop.org
* spirv: Claim support for the simple memory modelJason Ekstrand2017-10-261-1/+2
| | | | | | | | | | It's rather surprising that we've never actually hit this before. Aparently, Ian's SPIR-V generator currently claims the Simple when you don't do anything complex. We really shouldn't assert-fail on it. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: mesa-stable@lists.freedesktop.org
* Android: egl: add dependency on libnativewindowRob Herring2017-10-261-0/+4
| | | | | | | | | | | system/window.h is no longer available by default and is part of libnativewindow, so add it to the shared libraries. It has to be conditional because the library is only present in O and later. Really, we should only be depending on vndk/window.h now, but that's only in O and changing would be pretty invasive. Signed-off-by: Rob Herring <robh@kernel.org>
* meson: build nouveau vieux driverDylan Baker2017-10-262-0/+95
| | | | | | | | | Build tested only. v2: - fix spelling error (veaux -> vieux) Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* meson: build r200 driverDylan Baker2017-10-262-0/+94
| | | | | | | | | v2: - remove TODO that is done Build tested only Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* meson: build r100 driverDylan Baker2017-10-262-0/+90
| | | | | | | build tested only Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* intel/tools/disasm: correctly observe FILE *out parameterKevin Rogovin2017-10-261-2/+2
| | | | | | Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* intel/compiler: brw_validate_instructions to take const void* instead of void*Kevin Rogovin2017-10-262-2/+2
| | | | | | | The disassembler does not (and should not) be modifying the data. Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* loader: drop empty function aliasEric Engestrom2017-10-261-11/+2
| | | | | | | While at it, drop the duplicate return. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emli.velikov@collabora.com>
* radeonsi: add a workaround for weird s_buffer_load_dword behavior on SIMarek Olšák2017-10-261-3/+10
| | | | | | | | | | | | | | See my LLVM patch which fixes the root cause. Users have to apply this patch and then they have 2 choices: - Downgrade to LLVM 5.0 - Update to LLVM git after my LLVM patch is pushed. It won't be possible to use current and earlier development version of LLVM 6.0. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Cc: 17.3 <mesa-stable@lists.freedesktop.org>
* util: use OpenBSD/NetBSD code on FreeBSD/DragonFlyGreg V2017-10-261-1/+2
| | | | | | | | | Obtained from: FreeBSD ports Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Brian Paul <brianp@vmware.com> [Emil Velikov: wrap long line] Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* winsys/svga/drm: add ERESTART define for *BSDGreg V2017-10-261-0/+5
| | | | | | | Obtained from: FreeBSD ports Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* loader: use drmGetDeviceNameFromFd2 from libdrmGreg V2017-10-261-35/+1
| | | | | | | | | | | Reduce code duplication and automatically benefit from OS-specific fixes to libdrm (e.g. in FreeBSD ports). API was introduced with 2.4.74 and we already require 2.4.75 globally. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103283 Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* meson: wayland-egl depends on wayland-clientDaniel Stone2017-10-261-0/+1
| | | | | | | | | | | | Since wayland-egl.h is currently provided by the core Wayland package, depend on wayland-client to make sure we get it in our include path. Signed-off-by: Daniel Stone <daniels@collabora.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Fixes: 108d257a16 ("meson: build libEGL") Cc: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de> Cc: Dylan Baker <dylan@pnwbakers.com> Cc: Gert Wollny <gw.fossdev@gmail.com>
* freedreno: implement pipe->invalidate_resource()Rob Clark2017-10-262-1/+28
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* freedreno: GL_ARB_texture_barrierRob Clark2017-10-262-1/+13
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* freedreno/a5xx: rename invalidate_resource()Rob Clark2017-10-261-8/+9
| | | | | | This is different from pipe->invalidate_resource().. Signed-off-by: Rob Clark <robdclark@gmail.com>
* freedreno/a5xx: mem2gmem is read-only for BORob Clark2017-10-261-1/+1
| | | | | | | | This should be OUT_RELOC() since the operation isn't writing to the buffer. Technically it doesn't matter much currently, since we'd anyways to a gmem2mem later. But that will change. Signed-off-by: Rob Clark <robdclark@gmail.com>
* freedreno: small renameRob Clark2017-10-261-4/+4
| | | | Signed-off-by: Rob Clark <robdclark@gmail.com>
* radeon/video: add gfx9 offsets when rejoin the video surfaceLeo Liu2017-10-261-1/+4
| | | | | | | | For CPU access. Signed-off-by: Leo Liu <leo.liu@amd.com> Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Christian König <christian.koenig@amd.com>
* radv: only copy the dynamic states that changedSamuel Pitoiset2017-10-261-23/+69
| | | | | | | | | | | | | | | | When binding a new pipeline, we applied all dynamic states without checking if they really need to be re-emitted. This doesn't seem to be useful for the meta operations because only the viewports/scissors are updated. This should reduce the number of commands added to the IB when a new graphics pipeline is bound. Also, rename radv_dynamic_state_copy() to radv_bind_dynamic_state() and set the dirty flags directly there. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* radv: store the dynamic state mask into radv_dynamic_stateSamuel Pitoiset2017-10-263-7/+12
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* radv: only emit the depth bounds test values when set dynamicallySamuel Pitoiset2017-10-261-2/+1
| | | | | | | | The depth bounds test values are either set at pipeline creation or dynamically using vkCmdSetDepthBounds(). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* glsl/linker: Fix type checks for location aliasingIago Toral Quiroga2017-10-261-3/+19
| | | | | | | | | | | | | | From the OpenGL 4.6 spec, section 4.4.1 Input Layout Qualifiers, Page 68, (Location aliasing): "Further, when location aliasing, the aliases sharing the location must have the same underlying numerical type (floating-point or integer)." The current implementation is too strict, since it checks that the the base types are an exact match instead. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* glsl/linker: refactor check_location_aliasingIago Toral Quiroga2017-10-261-64/+46
| | | | | | | Mostly, this merges the type checks with all the other checks so we only have a single loop for this. Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
* glsl/linker: validate explicit locations for SSO programsIago Toral Quiroga2017-10-263-0/+71
| | | | | | | | | | | v2: - we only need to validate inputs to the first stage and outputs from the last stage, everything else has already been validated during cross_validate_outputs_to_inputs (Timothy). - Use MAX_VARYING instead of MAX_VARYINGS_INCL_PATCH (Illia) Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>