summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: move descriptor logs to after corresponding draw/compute packetNicolai Hähnle2017-09-292-8/+6
| | | | | | | | It has to happen after descriptor uploads since otherwise we'll print out the wrong GPU list / incorrectly claim descriptor corruption. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/common: remove ac_shader_abi::chip_classNicolai Hähnle2017-09-293-15/+10
| | | | | | | Redundant with the recently added ac_llvm_context::chip_class. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: fix a commentNicolai Hähnle2017-09-291-1/+1
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* i965/fs: force pull model for 64-bit GS inputsIago Toral Quiroga2017-09-292-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Triggering the push model when 64-bit inputs are involved is not easy due to the constrains on the maximum number of registers that we allow for this mode, however, for GS with 'points' primitive type and just a couple of double varyings we can trigger this and it just doesn't work because the implementation is not 64-bit aware at all. For now, let's make sure that we don't attempt this model whith 64-bit inputs and we always fall back to pull model for them. Also, don't enable the VUE handles in the thread payload on the fly when we find an input for which we need the pull model, this is not safe: if we need to resort to the pull model we need to account for that when we setup the thread payload so we compute the first non-payload register properly. If we didn't do that correctly and we enable it on-the-fly here then we will end up VUE handles on the first non-payload register which will probably lead to GPU hangs. Instead, always enable the VUE handles for the pull model so we can safely use them when needed. The GS is going to resort to pull model almost in every situation anyway, so this shouldn't make a significant difference and it makes things easier and safer. v2: Always enable the VUE handles for pull model, this is easier and safer and the GS is going to fallback to pull model almost always anyway (Ken) v3: Only clamp the URB read length if we are over the maximum reserved for push inputs as we were doing in the original code (Ken). v4: No need to clamp the urb read length if invocations > 1 Reviewed-by: Kenneth Graunke <[email protected]>
* i965/link: Use prog->nir instead of creating a temporaryJason Ekstrand2017-09-281-4/+3
| | | | | | | | | This way, when NIR_PASS_V makes a clone of the shader (for testing nir_clone), the new and lowered version gets re-assigned to prog->nir. [[email protected]: Tested NIR_TEST_CLONE=1 with valgrind] Tested-by: Jordan Justen <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965/link: Make more use of NIR_PASSJason Ekstrand2017-09-281-6/+6
| | | | | | [[email protected]: Tested NIR_TEST_CLONE=1 with valgrind] Tested-by: Jordan Justen <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965/link: Make better use of temporary variablesJason Ekstrand2017-09-281-4/+5
| | | | | | | | | | | The way NIR_PASS works (and, by extension, nir_optimize) is that they may clone the shader and throw the old one away. (We use this for testing nir_clone.) It's better if we just make a temporary variable, use it for everything, and re-assign to the gl_program at the end. [[email protected]: Tested NIR_TEST_CLONE=1 with valgrind] Tested-by: Jordan Justen <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* util: fix in-class initialization of static memberThomas Helland2017-09-281-3/+6
| | | | | | | | | | | | | | Fix a compile error with G++ 4.4 string_buffer_test.cpp:43: error: ISO C++ forbids initialization of member ‘str1’ string_buffer_test.cpp:43: error: making ‘str1’ static string_buffer_test.cpp:43: error: invalid in-class initialization of static data member of non-integral type ‘const char*’ Tested-by: Vinson Lee <vlee at freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103002
* meson: remove duplicate libisl dependency in anvDylan Baker2017-09-281-1/+1
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* svga: add missing PIPE_SHADER_CAP_INT64_ATOMICS switch casesBrian Paul2017-09-281-0/+2
| | | | | | Silences a compiler warning. Reviewed-by: Roland Scheidegger <[email protected]>
* svga: trivial whitespace clean-ups in svga_screen.cBrian Paul2017-09-281-11/+13
|
* gallium/util: use new util_vasprintf() functionBrian Paul2017-09-281-1/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* util: add util_vasprintf() for Windows (v2)Brian Paul2017-09-281-0/+22
| | | | | | | | We don't have vasprintf() on Windows so we need to implement it ourselves. v2: compute actual length of output string, per Nicolai Hähnle. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: don't call close() on WindowsBrian Paul2017-09-281-0/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* svga: start advertising PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTIONNeha Bhende2017-09-281-1/+3
| | | | | | | | | | | Since our driver support arb_provoking_vertex, we can start advertising PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION Fixes ./clipflat & ./arb-provoking-vertex-render piglit tests Tested piglit, glretrace on Hw 11 and Hw 13 Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix texture updates for ATI_fragment_shaderMarek Olšák2017-09-281-3/+5
| | | | | | Cc: 17.1 17.2 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* etnaviv: optimize RS transfersLucas Stach2017-09-281-4/+25
| | | | | | | | | | | | | Currently we are blitting the whole resource when the RS is used to de-/tile a resource. This can be very inefficient for large resources where the transfer is only changing a small part of the resource (happens a lot with glTexSubImage2D). Optimize this by only blitting the tile aligned subregion of the resource, which the transfer is going to change. Signed-off-by: Lucas Stach <[email protected]> Reviewed-By: Wladimir J. van der Laan <[email protected]>
* etnaviv: add resource subregion copyLucas Stach2017-09-282-0/+32
| | | | | | | | This is useful if we only need to copy part of a larger resource, mostly when using the RS engine to de-/tile on pipe transfers. Signed-off-by: Lucas Stach <[email protected]> Reviewed-By: Wladimir J. van der Laan <[email protected]>
* etnaviv: support tile aligned RS blitsLucas Stach2017-09-281-8/+78
| | | | | | | | The RS can blit abitrary tile aligned subregions of a resource by adjusting the buffer offset. Signed-off-by: Lucas Stach <[email protected]> Reviewed-By: Wladimir J. van der Laan <[email protected]>
* st/va: use pipe transfer_map to map upload bufferLeo Liu2017-09-281-3/+9
| | | | | | | | | | The function pipe_buffer_map() is only for linear pipe buffer, with height as 0, and it's not for any 2D textures. Signed-off-by: Leo Liu <[email protected]> Cc: [email protected] Cc: Mark Thompson <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* anv: add an assertion in genX(BeginCommandBuffer)Gwan-gyeong Mun2017-09-281-0/+1
| | | | | | | To check a valid usage requirement. Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* radv: add an assertion in radv_BeginCommandBuffer()Gwan-gyeong Mun2017-09-281-0/+1
| | | | | | | | | To check a valid usage requirement. CID: 1401616 Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium/docs: add reference links for resource_create methodGwan-gyeong Mun2017-09-281-2/+2
| | | | | | | It adds reference links for arguments usage and bind of resource_create(). Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/docs: fix a reference link for get_paramfGwan-gyeong Mun2017-09-281-1/+1
| | | | | | | | Previous get_paramf links same as get_param. It changes the reference link to PIPE_CAPF_* Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* i965: enable up to 32 inputs for geometry shaders in gen8+Iago Toral Quiroga2017-09-281-1/+2
| | | | | | | | | | | | | | | | | | | | | We have been exposing only 16 since 1e3e72e3054de with arguments based on register pressure and the number of available GRFs, however, our scalar backend will always limit the number of push registers for GS threads to 24 and fallback to pull model for anything else, so there is really no reason to lower the number under those arguments. By bumping this up to 32 we make it the same as all the other stages, which is a nice feature to have that can help applications in some cases (I recently fixed a bug in CTS that assumed that the number of input locations in a stage matches the number of output locations in the previous stage for example). Pre-gen8, we use the vector backend and push model, so in that case the arguments in 1e3e72e3054de are still valid. v2: check if we have scalar GS instead of the hw gen to enable this (Ken). Reviewed-by: Kenneth Graunke <[email protected]>
* radv: set image view type when decompressing depth surfacesSamuel Pitoiset2017-09-281-0/+1
| | | | | | | This was missing. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* broadcom/vc4: Fix release buildEric Anholt2017-09-271-1/+1
| | | | | | | | | I remember thinking "gosh, it would be nice if I could do a kernel-style 'if (!IS_ENABLED(DEBUG))' instead of using an #ifdef, so the code was compiled on both builds", and then forgot to test a release build anyway. Fixes: a8fd58eae596 ("vc4: Add labels to BOs for debug builds or with VC4_DEBUG=surf set.") Reported-by: Derek Foreman <[email protected]>
* vc4: Add labels to BOs for debug builds or with VC4_DEBUG=surf set.Eric Anholt2017-09-274-0/+41
| | | | | | | This has proven to be incredibly useful for debugging CMA allocation failures and driving memory management improvements. However, we don't want to burden entry and exit from the BO cache with the labeling ioctl's overhead on release builds.
* meson: build "radv" vulkan driver for radeon hardwareDylan Baker2017-09-275-1/+278
| | | | | | | | | | | | | | | | This builds, installs, and has been tested on a r290x (Hawaii) with the Vulkan CTS. It dies horribly in a fire at the same point for the meson build as the autotools build. v2: - enable radv by default - add shader cache support and enforce that it's built for radv v3: - Fix typo in meson_options (Nicholas) - strip trailing 'svn' from llvm version before setting the version preprocessor flag (Bas) - Check for LLVM module requirements Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* meson: Add build Intel "anv" vulkan driverDylan Baker2017-09-2721-0/+1395
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows building and installing the Intel "anv" Vulkan driver using meson and ninja, the driver has been tested against the CTS and has seems to pass the same series of tests (they both segfault when the CTS tries to run wayland wsi tests). There are still a mess of TODO, XXX, and FIXME comments in here. Those are mostly for meson bugs I'm trying to fix, or for additional things to implement for other drivers/features. I have configured all intermediate libraries and optional tools to not build by default, meaning they will only be built if they're pulled in as a dependency of a target that will actually be installed) this allows us to avoid massive if chains, while ensuring that only the bits that need to be built are. v2: - enable anv, x11, and wayland by default - add configure option to disable valgrind v3: - fix typo in meson_options (Nicholas) v4: - Remove dead code (Eric) - Remove change to generator that was from v0 (Eric) - replace if chain with loop (Eric) - Fix typos (Eric) - define HAVE_DLOPEN for both libdl and builtin dl cases (Eric) v5: - rebase on util string buffer implementation Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (v4)
* util/ralloc: Don't define assert with magic member without DEBUGDylan Baker2017-09-271-0/+8
| | | | | | | | | | It is possible to have DEBUG disabled but asserts on (NDEBUG), which cannot build because these asserts work on members that are only present when DEBUG is on. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
* intel: use a flag instead of setting PYTHONPATHDylan Baker2017-09-272-9/+26
| | | | | | | | | | | | Meson doesn't allow setting environment variables for custom targets, so we either need to not pass this as an environment variable or use a shell script to wrap the invocation. The chosen solution has the advantage of working for both autotools and meson. v2: - put rules back in top scope (Ken) Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
* st/dri: don't expose modifiers in EGL if the driver doesn't implement themMarek Olšák2017-09-271-3/+5
| | | | | | | | This unbreaks waffle/gbm (piglit/gbm) which fails initialization. v2: also don't set queryDmaBufFormats Reviewed-by: Daniel Stone <[email protected]>
* vulkan/wsi/wayland: Return better error messagesJason Ekstrand2017-09-271-21/+36
| | | | | Reviewed-by: Daniel Stone <[email protected]> Cc: [email protected]
* vulkan/wsi/wayland: Copy wl_proxy objects from oldSwapchain if availableJason Ekstrand2017-09-271-6/+33
| | | | | | | This should save us some round trips while resizing. Reviewed-by: Daniel Stone <[email protected]> Cc: [email protected]
* vulkan/wsi/wayland: Stop caching Wayland displaysJason Ekstrand2017-09-271-107/+54
| | | | | | | | | | | | | | | | | | | We originally implemented caching to avoid unneeded round-trips to the compositor when querying surface capabilities etc. to set up the swapchain. Unfortunately, this doesn't work if vkDestroyInstance is called after the Wayland connection has been dropped. In this case, we end up trying to clean up already destroyed wl_proxy objects which leads to crashes. In particular most of dEQP-VK.wsi.wayland is crashing thanks to this problem. This commit gets rid of the cache and simply embeds the wsi_wl_display struct in the swapchain. While we're at it, we can get rid of the wl_event_queue that we were storing in the swapchain because we can just use the one in the embedded wsi_wl_display. Reviewed-by: Daniel Stone <[email protected]> Bugzilla: https://bugs.freedesktop.org/102578 Cc: [email protected]
* vulkan/wsi/wayland: Refactor wsi_wl_display codeJason Ekstrand2017-09-271-14/+33
| | | | | | | | We convert it over to an inti/finish model and make create/destroy wrappers for the former. Reviewed-by: Daniel Stone <[email protected]> Cc: [email protected]
* clover: Query and export int64 atomicsJan Vesely2017-09-273-2/+11
| | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* glx: Be more tolerant in glXImportContext (v2)Adam Jackson2017-09-271-42/+30
| | | | | | | | | | | | | Ugh the GLX code. __GLX_MAX_CONTEXT_PROPS is 3 because glxproto.h is just a pile of ancient runes, so when the server begins sending more than 3 context properties this code refuses to work _at all_. Which is all just silly. If _XReply succeeds, it will have buffered the whole reply, we can just walk through each property one at a time. v2: Now with no arbitrary limits. (Eric Anholt) Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* egl/dri2: Implement swapInterval fallback in a conformant way (v2)Tomasz Figa2017-09-276-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dri2_fallback_swap_interval() currently used to stub out swap interval support in Android backend does nothing besides returning EGL_FALSE. This causes at least one known application (Android Snapchat) to fail due to an unexpected error and my loose interpretation of the EGL 1.5 specification justifies it. Relevant quote below: The function EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval); specifies the minimum number of video frame periods per buffer swap for the draw surface of the current context, for the current rendering API. [...] The parameter interval specifies the minimum number of video frames that are displayed before a buffer swap will occur. The interval specified by the function applies to the draw surface bound to the context that is current on the calling thread. [...] interval is silently clamped to minimum and maximum implementation dependent values before being stored; these values are defined by EGLConfig attributes EGL_MIN_SWAP_INTERVAL and EGL_MAX_SWAP_INTERVAL respectively. The default swap interval is 1. Even though it does not specify the exact behavior if the platform does not support changing the swap interval, the default assumed state is the swap interval of 1, which I interpret as a value that eglSwapInterval() should succeed if called with, even if there is no ability to change the interval (but there is no change requested). Moreover, since the behavior is defined to clamp the requested value to minimum and maximum and at least the default value of 1 must be present in the range, the implementation might be expected to have a valid range, which in case of the feature being unsupported, would correspond to {1} and any request might be expected to be clamped to this value. Fix this by defaulting dri2_dpy's min_swap_interval, max_swap_interval and default_swap_interval to 1 in dri2_setup_screen() and let platforms, which support this functionality set their own values after this function returns. Thanks to patches merged earlier, we can also remove the dri2_fallback_swap_interval() completely, as with a singular range it would not be called anyway. v2: Remove dri2_fallback_swap_interval() completely thanks to higher layer already clamping the requested interval and not calling the driver layer if the clamped value is the same as current. Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* gallium/radeon: consolidate PIPE_BIND_SHARED/SCANOUT handlingMarek Olšák2017-09-272-13/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: remove useless check in si_blit_decompress_color()Samuel Pitoiset2017-09-271-1/+3
| | | | | | | | That's unnecessary to double-check that dcc_offset is not 0 because all callers already check that. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: more use of vi_dcc_formats_are_incompatible()Samuel Pitoiset2017-09-271-2/+1
| | | | | | | Found by inspection. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: store the amount of saved constants in the compute stateSamuel Pitoiset2017-09-277-17/+20
| | | | | | | It's safer and more elegant. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove useless radv_meta_{begin,end}_XXX() helpersSamuel Pitoiset2017-09-274-62/+9
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* swr: Remove unneeeded comparisonGeorge Kyriazis2017-09-261-2/+1
| | | | | | No need to check if screen->pipe != pipe, so we can just assign it. Just do it. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: Handle resource across context changesGeorge Kyriazis2017-09-264-10/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Swr caches fb contents in tiles. Those tiles are stored on a per-context basis. When switching contexts that share resources we need to make sure that the tiles of the old context are being stored and the tiles of the new context are being invalidated (marked as invalid, hence contents need to be reloaded). The context does not get any dirty bits to identify this case. This has to be, then, coordinated by the resources that are being shared between the contexts. Add a "curr_pipe" hook in swr_resource that will allow us to identify a MakeCurrent of the above form during swr_update_derived(). At that time, we invalidate the tiles of the new context. The old context, will need to have already store its tiles by that time, which happens during glFlush(). glFlush() is being called at the beginning of MakeCurrent. So, the sequence of operations is: - At the beginning of glXMakeCurrent(), glFlush() will store the tiles of all bound surfaces of the old context. - After the store, a fence will guarantee that the all tile store make it to the surface - During swr_update_derived(), when we validate the new context, we check all resources to see what changed, and if so, we invalidate the current tiles. Fixes rendering problems with CEI/Ensight. Reviewed-by: Bruce Cherniak <[email protected]>
* vulkan/wsi/wayland: Stop printing out the DRM deviceJason Ekstrand2017-09-261-1/+0
| | | | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Cc: [email protected]
* i965: Support copy propagating of untyped atomic surface indexes.Kenneth Graunke2017-09-261-0/+7
| | | | | | | | In the vec4 backend, SHADER_OPCODE_UNTYPED_ATOMIC's src[1] is the surface index. We want to copy propagate so we can use an immediate message descriptor, rather than an indirect send. Reviewed-by: Ian Romanick <[email protected]>
* i965/vec4: Fix swizzles on atomic sources.Kenneth Graunke2017-09-261-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Atomic operation sources are scalar values, but we were failing to select the .x component of the second operand. For example, atomicCounterCompSwapARB(counter, 5u, 10u) would generate mov(8) vgrf4.x:D, 5D mov(8) vgrf5.x:D, 10D mov(8) vgrf9.x:UD, vgrf4.xyzw:D mov(8) vgrf9.y:UD, vgrf5.xyzw:D which wrongly selects the .y component of vgrf5, so the actual 10u value would get dead code eliminated. The swizzle works for the other source, but both of them ought to be .xxxx. Fixes the compare and swap CTS tests in: KHR-GL45.shader_atomic_counter_ops_tests.ShaderAtomicCounterOpsExchangeTestCase Cc: "17.2 17.1 17.0 13.0" <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>