summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* svga: add missing PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER* casesBrian Paul2017-11-161-0/+2
| | | | | Reviewed-by: Charmaine Lee <[email protected]> Acked-by: Dave Airlie <[email protected]>
* glsl: s/unsigned/glsl_base_type/ in glsl type code (v2)Brian Paul2017-11-162-22/+35
| | | | | | | | | | | | | | | | Declare glsl_type::sampled_type as glsl_base_type as we do for the base_type field. And make base_type a bitfield to save a few bytes. Update glsl_type constructor to take glsl_base_type instead of unsigned and pass GLSL_TYPE_VOID instead of zero. No Piglit regressions with llvmpipe. v2: - Declare both base_type and sampled_type as 8-bit fields - Use the new ASSERT_BITFIELD_SIZE() macro. Reviewed-by: Nicolai Hähnle <[email protected]>
* util/tgsi: use ASSERT_BITFIELD_SIZE() to check opcode field sizeBrian Paul2017-11-161-0/+2
| | | | | | | | | I've noticed at least two places where we store the TGSI opcode in an unsigned:8 bitfield. We're at 249 opcodes now. If we hit 256 we'll need to grow those bitfields. Use the new ASSERT_BITFIELD_SIZE() macro to detect that. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: use enum types instead of int/unsigned (v3)Brian Paul2017-11-164-12/+23
| | | | | | | | | | | | | Use the proper enum types for various variables. Makes life in gdb a little nicer. Note that the size of enum bitfields must be one larger so the high bit is always zero (for MSVC). v2: also increase size of image_format bitfield, per Eric Engestrom. v3: use the new ASSERT_BITFIELD_SIZE() macro Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* util: add new ASSERT_BITFIELD_SIZE() macro (v3)Brian Paul2017-11-161-0/+17
| | | | | | | | | | For checking that bitfields are large enough to hold the largest expected value. v2: move into existing util/macros.h header where STATIC_ASSERT() lives. v3: add MAYBE_UNUSED to variable declaration Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: don't move ssbo after atomic buffers if we support hw atomicsDave Airlie2017-11-172-9/+13
| | | | | | | There is no need to have these overlap if we support hw atomics. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* i965: Upload invariant state once at the start of the batch on Gen4-5.Kenneth Graunke2017-11-164-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | We want to emit invariant state at the start of a render batch. In the past, this more or less happened: a new batch flagged BRW_NEW_CONTEXT (because we don't have hardware contexts), which triggered the brw_invariant_state atom. So, it would be emitted before any 3D drawing. (Technically, there might be some BLT commands in the batch because Gen4-5 have a single combined render/BLT ring, but that should be harmless). With the advent of BLORP, this broke. The first item in a batch might be a BLORP operation, which bypasses the normal draw upload path. So, we need to ensure invariant state happens first. To do that, we just upload it when creating a new batch. On Gen6+ we'd need to worry about whether it's a RENDER or BLT batch, but because we have a combined ring, this approach should work fine on Gen4-5. Seems to fix GPU hangs when playing hardware accelerated video with mpv -hwdec=vaapi on Ironlake. Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103529 Reviewed-by: Jason Ekstrand <[email protected]>
* docs: update features/relnotes for r600 shader image support. (v2)Dave Airlie2017-11-172-9/+11
| | | | | | v2: update GLES Signed-off-by: Dave Airlie <[email protected]>
* r600: enable ARB_shader_image_load_store, ARB_shader_image_sizeDave Airlie2017-11-171-3/+9
| | | | | | | This also enables GL4.2 for gpus with hw fp64 (cayman, cypress) Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: handle image size support.Dave Airlie2017-11-173-9/+101
| | | | | | | | This adds support for the RESQ opcode with the workaround required due to hw bugs for buffers and cube arrays. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600/sb: disable SB for images.Dave Airlie2017-11-171-0/+1
| | | | | | | Until we can work further on sb, disable it for images for now. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600/shader: add support for load/store/atomic ops on images.Dave Airlie2017-11-171-4/+315
| | | | | | | | This adds support to the shader assembler for load/store/atomic ops on images which are handled via the RAT operations. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: add core pieces of image support.Dave Airlie2017-11-176-3/+428
| | | | | | | | | This adds the atoms and gallium api implementations, along with support for compress/decompress paths for shader images. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600/shader: implement getting thread id.Dave Airlie2017-11-171-0/+74
| | | | | | | | We need the thread id to use the immediate buffer readback mechanism, so add support for calculating it. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600/shader: add flag to denote if shader uses imagesDave Airlie2017-11-172-0/+2
| | | | | Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: implement basic memory barrier.Dave Airlie2017-11-172-5/+24
| | | | | | | | This isn't 100% perfect (fglrx also fails a bunch of those tests) but implement the start of a memory barrier for image support. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: allocate immed buffer resource for images.Dave Airlie2017-11-173-0/+21
| | | | | | | | | In order to image readback we have to execute a MEM_RAT instruction that needs a buffer to transfer the result into until the shader can fetch it. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: handle writes_memory properlyDave Airlie2017-11-172-3/+13
| | | | | | | This implements proper handling for shaders with side effects. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* autotools: change version TINY -> PATCHDylan Baker2017-11-164-7/+7
| | | | | | | | Because patch is more common than tiny for talking about the 3rd element of a version. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* autotools: set XA versions in configure.ac and configure header fileDylan Baker2017-11-162-11/+7
| | | | | | | | | | | | | | | | | | | | Currently the versions are set in the header, and then sed is used to extract them, so that autotools can use them elsewhere. This is odd. Autotools is perfectly capable of configuring the header with the versions, and then they don't need to be extracted from the the header. This is cleaner and more obvious. Tested with make distcheck. v2: - Split tiny -> patch change - Drop temporary variables - change XA_VERSION_* -> XA_* v3: - Finish splitting the tiny -> patch change Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> (v2)
* genxml: Fix PIPELINE_SELECT on G45/Ironlake.Kenneth Graunke2017-11-162-2/+2
| | | | | | | | | Original 965 sets bits 28:27 to 0, while G45 and later set it to 1. Note that the G45 docs are incorrect in this regard - see the DevCTG+ note in the Ironlake PRMs. Reviewed-by: Lionel Landwerlin <[email protected]>
* egl: pass the dri2_dpy to the $plat_teardown functionsEmil Velikov2017-11-161-2/+2
| | | | | | | | | Cc: Mark Janes <[email protected]> Fixes: 40a01c9a0ef ("egl/drm: move teardown code to the platform file") Fixes: 8d745abc009 ("egl/wayland: move teardown code to the platform file") Signed-off-by: Emil Velikov <[email protected]> Tested-by: Dylan Baker <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103784
* meson: Add dridriverdir variable to dri.pc.Rafael Antognolli2017-11-161-0/+1
| | | | | | | | | Xorg (and possibly other things) depend on this variable to find the path to DRI drivers. Signed-off-by: Rafael Antognolli <[email protected]> Cc: Dylan Baker <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* docs: add documentation for building with mesonDylan Baker2017-11-162-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | v2: - Add information about CC, CXX, CFLAGS, and CXXFLAGS (Nicolai) - Add message at top that meson for mesa is still a work in progress - Add trailing "/" to directories (Eric E.) - Fix a number of spelling/grammar/style suggestions from Eric E. - Make a number of changes as suggested by Emil. v3: - Fix order of commands in example (Eric E.) - Add documentation for overriding LLVM version (Eric E.) v4: - Rebase on master - update default buildtype - add note about b_ndebug - Clarify meson configure a bit v5: - use <code> for command line arguments (Eric E.) - Add note about listing options without a build directory - Minor formatting changes (Eric E.) - Replace the CC, CFLAGS, etc section with an environment variables section, which mentions CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS, and DESTDIR - Add comment that not using buildtype debug might make debugging harder - Add comment that b_ndebug and buildtype are orthogonal Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (v3)
* docs: Point to apt.llvm.org for development snapshot packagesKai Wasserbäch2017-11-161-0/+6
| | | | | Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: fix var typeEric Engestrom2017-11-161-1/+1
| | | | | | | | | | | | | queryImage() takes an `int*`; compiler is warning about the signed<->unsigned pointer mismatch. Fixes: 0db36caa192b129cb4f2 "egl/wayland: Add a fallback when fourcc query isn't supported" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Frank Binns <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Derek Foreman <[email protected]>
* i915: add missing extensions.h includeEmil Velikov2017-11-162-0/+2
| | | | | | | | | | | Otherwise we'll bail with due to -Werror=implicit-function-declaration. It went unnoticed since the we had a bug which did consistently set the compiler flag. Fixes: ba8a347f932 ("mesa: split extensions overrides and glGetString(GL_EXTENSIONS)") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Andres Gomez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: return 'unrecognized' extensions in glGetStringiEmil Velikov2017-11-161-0/+13
| | | | | | | | Analogous to the glGetString() case - report all the extensions enabled via MESA_EXTENSION_OVERRIDE Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: rework the way we manage extra_extensionsEmil Velikov2017-11-162-43/+39
| | | | | | | | | | | | | | Store pointers to the tokenized strings in the gl_extensions struct. This way we can reuse them in glGetStringi() while we construct the really long string only in _mesa_make_extension_string. Only 16 pointers/strings are stored for now. v2: Warn only once when we provide more than 16 unk. extensions, rebase Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* mesa: pass the ctx to _mesa_one_time_init_extension_overridesEmil Velikov2017-11-163-3/+3
| | | | | | | Will be needed with next commit Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: call atexit() only as neededEmil Velikov2017-11-161-3/+1
| | | | | | | | | | If the extra_extensions string is empty there's no need to call atexit() - there's nothing to free. v2: Rebase Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]> (v1)
* mesa: remove unnecessary 'sort by year' for the GL extensionsEmil Velikov2017-11-161-50/+3
| | | | | | | | | | | | | | | | | | | The sorting was originally added to work around broken games (comment says Quake3 demo) that were copying the extensions list into small buffer. Sorting does not solve the problem, since we'll still overflow and cause corruption/crash. Better workaround is to actually trim the string ... as done with a later commit which introduces the MESA_EXTENSION_MAX_YEAR env. variable. Side note: On my machine, the existing sorting makes no changes to the extensions string. Cc: Jose Fonseca <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: reuse set_extension() for _mesa_extension_override_disablesEmil Velikov2017-11-161-4/+3
| | | | | | | | We already use it for _mesa_extension_override_enables. Improve consistency and use it for both extension lists. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: drop unnecessary coping of extra_extensionsEmil Velikov2017-11-161-11/+6
| | | | | | | | | | The function get_extension_override() returns a copy of a string, only for it to be copied again ... Drop the unneeded calloc/strdup/free dance. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove duplicate 'disabled extensions' listEmil Velikov2017-11-161-7/+1
| | | | | | | | | | | | | | | While parsing MESA_EXTENSION_OVERRIDE we keep track of the disabled extensions, twice - in _mesa_extension_override_disables and disabled_extensions. Upon context creation, we use the former to modify the extensions list. Yet, we still check the updated list against disabled_extensions. Remove disabled_extensions, it's obsolete. Cc: Jordan Justen <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: call _mesa_make_extension_string only as neededEmil Velikov2017-11-162-2/+2
| | | | | | | | | | | | | | As of previous commit we removed the extension overrides from this function. Thus we no longer need to call it during MakeCurrent, so we can construct the extensions string when needed - _mesa_GetString. This commit effectively reverts a879d14ecf8 ("mesa: initialize extension string when context is first bound") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: split extensions overrides and glGetString(GL_EXTENSIONS)Emil Velikov2017-11-1612-20/+24
| | | | | | | | | | | | | Currently we apply the extension overrides and construct the extensions string upon MakeCurrent. They are two distinct things, so let's slit the two while pushing the overrides management _before_ _mesa_compute_version(). This ensures that the version is updated to reflect the enabled/disabled extensions. Cc: Jordan Justen <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: remove ARB_compute_shader extension overrideEmil Velikov2017-11-161-2/+1
| | | | | | | | | | | | Checking the override was useful in the early stages of developing the extension. Now that everything is wired, where possible, we can drop the check. Doing so allows us to simplify some of the related code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: use _mesa_is_desktop_gl helperEmil Velikov2017-11-161-1/+1
| | | | | | | Use the helper over opencoding the check. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl: add note about missing $plat_teardownEmil Velikov2017-11-161-0/+1
| | | | | | | | Some platforms are missing a proper teardown function. Add a small TODO to make it obvious. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/wayland: move teardown code to the platform fileEmil Velikov2017-11-163-20/+27
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/drm: move teardown code to the platform fileEmil Velikov2017-11-163-5/+12
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/x11: move teardown code to the platform fileEmil Velikov2017-11-163-5/+11
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: Provide meaningfull error when built w/o requested platformEmil Velikov2017-11-162-11/+41
| | | | | | | | | | | The current "No EGL platform enabled." is misleading and wrong. We reach said code when $platform is missing. To make this more obvious and clear provide wrappers in the header file, making the code a bit easier to follow. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Don't define HAVE_PTHREAD only on linuxJon Turney2017-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | I'm not sure of the reason for this. I don't see anything like this in configure.ac In include/c11/threads.h the cases are: 1) building for Windows -> threads_win32.h 2) HAVE_PTHREAD -> threads_posix.h 3) Not supported on this platform So not defining HAVE_PTHREAD for anything not Windows just means we can't build at all. When we are building for Windows, I'm not sure if dependency('threads') would ever find anything, or defining HAVE_PTHREAD has any effect, but avoid defining it there, just in case. Signed-off-by: Jon Turney <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* freedreno: also mark images used by draw/gridRob Clark2017-11-161-0/+18
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno: mark SSBOs written at draw timeRob Clark2017-11-161-1/+1
| | | | | | Comment was right, implementation was wrong ;-) Signed-off-by: Rob Clark <[email protected]>
* freedreno/a5xx: ARB_framebuffer_no_attachments supportRob Clark2017-11-163-1/+11
| | | | Signed-off-by: Rob Clark <[email protected]>
* i965: Implement another VF cache invalidate workaround on Gen8+.Kenneth Graunke2017-11-161-8/+33
| | | | | | | | | | | | ...and provide a better citation for the existing one. v2: - Apply the workaround to Gen8 too, as intended (caught by Topi). - Restructure to add bits instead of an extra flush (based on a similar patch by Rafael Antognolli). Cc: [email protected] Reviewed-by: Rafael Antognolli <[email protected]>
* tgsi/exec: fix LDEXP in softpipeNicolai Hähnle2017-11-161-1/+1
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103128 Fixes: cad959d90145 ("gallium: add LDEXP TGSI instruction and corresponding cap") Reviewed-by: Brian Paul <[email protected]>