summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* radeon/ac: switch to ac_shader_binary_config_start()Timothy Arceri2017-02-282-3/+4
| | | | | | | | For radeonsi we could probably switch to ac_shader_binary_read_config(). However the functions have diverged so just share this helper for now. Reviewed-by: Marek Olšák <[email protected]>
* radeon/ac: make ac_shader_binary_config_start() available externallyTimothy Arceri2017-02-282-1/+8
| | | | | | | | The read config functions are different for r600 and radeonsi so we can't just share the one in amd common. So just share this instead. Reviewed-by: Marek Olšák <[email protected]>
* radeon/ac: switch from radeon_elf_read() to ac_elf_read()Timothy Arceri2017-02-284-6/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeon/ac: switch from radeon_shader_binary to ac_shader_binaryTimothy Arceri2017-02-2812-73/+36
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeon/ac: add llvm_ir_string to ac_shader_binary structTimothy Arceri2017-02-281-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ralloc: Delete autofree handling.Kenneth Graunke2017-02-272-27/+0
| | | | | | | | | | | | | There was exactly one user of this, and I just removed it. It also accessed an implicit global context, with no locking. This meant that it was only safe if all callers of ralloc_autofree_context() held the same lock...which is a pretty terrible thing for a utility library to impose. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* compiler: Free types in _mesa_glsl_release_types() rather than autofree.Kenneth Graunke2017-02-271-1/+4
| | | | | | | | | | | | | | | | | Instead of using ralloc_autofree_context() to install an atexit() handler to ralloc_free(glsl_type::mem_ctx), we can simply free them from _mesa_glsl_release_types(). This is effectively the same, because _mesa_glsl_release_types() is called from _mesa_destroy_shader_compiler(), which is called from Mesa's one_time_fini() function, which Mesa installs as an atexit() handler. The one advantage here is that it ensures the built-in functions are destroyed before the types. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* clover: Dump linked binary to a different fileJan Vesely2017-02-271-2/+6
| | | | | | | | | | this allows to pass the generated files directly to llc or bugpoint v2: add atomic counter ID v3: remove extra scope operator, constify Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* radv: fix depth format in blit2d.Dave Airlie2017-02-281-2/+5
| | | | | | | | | | | | | For blitting we need to use the depth or stencil format, never the combined. This fixes: dEQP-VK.texture.shadow.2d.nearest.less_or_equal_d32_sfloat_s8_uint and a few others. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "13.0 17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/formats: add fast clear for 8-bit signed ints.Dave Airlie2017-02-281-0/+16
| | | | | | | These formats are used by some CTS tests, may as well fill them in. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa/main: refactor sampler parameter error codepathSamuel Pitoiset2017-02-271-87/+52
| | | | | | | | | This is similar to what we do in the texture error codepath. While we are at it, update the specification comment with latest GL 4.5 spec. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl: reject samplers not declared as uniform/function params earlierSamuel Pitoiset2017-02-271-0/+9
| | | | | | | | | | | | | | This improves consistency with image variables and atomic counters which are already rejected the same way. Note that opaque variables can't be treated as l-values, which means only the 'in' function parameter is allowed. v2: rewrite commit message Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> (v1) Reviewed-by: Marek Olšák <[email protected]> (v2)
* glsl: use is_sampler() anywhere it's possibleSamuel Pitoiset2017-02-275-17/+16
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: use is_image() anywhere it's possibleSamuel Pitoiset2017-02-273-4/+3
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: add missing blend_support qualifier in validate_flags()Samuel Pitoiset2017-02-271-1/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Andres Gomez <[email protected]>
* glsl: use an enum for AMD_conservative_depth layout qualifiersSamuel Pitoiset2017-02-274-35/+40
| | | | | | | | | | | | | | | | | | | | | | | The main idea behind this is to free some bits in the flags.q struct because currently all 64-bits are used and we can't add more layout qualifiers without reaching a static assert. In order to do that (mainly for ARB_bindless_texture), use an enumeration for the AMD_conservative_depth layout qualifiers because it's forbidden to declare more than one depth qualifier for gl_FragDepth. Note that ast_type_qualifier::merge_qualifier() will prevent using duplicate layout qualifiers by returning a compile-time error. No piglit regressions found (including compiler tests) with RX480 on RadeonSI. v2: use a switch case Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Andres Gomez <[email protected]> (v1)
* glsl: add has_shader_image_load_store()Samuel Pitoiset2017-02-273-4/+7
| | | | | | | | Preliminary work for ARB_bindless_texture which can interact with ARB_shader_image_load_store. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* drirc: add force_glsl_version=440 for The CullingSamuel Pitoiset2017-02-271-0/+4
| | | | | | | | | | | | | | | | This game uses GLSL 430 but the interpolation qualifiers in some shaders don't match, which ends up in a link error. GLSL 440 spec removed this restriction, force it. This fixes the following link error, as well as serious rendering problems. error: vertex shader output `out_TEXCOORD1' specifies noperspective interpolation qualifier, but fragment shader input specifies no interpolation qualifier Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* anv: Bump advertised version to 1.0.42Jason Ekstrand2017-02-271-1/+1
| | | | | | | We've been following the spec changes. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* vulkan: Update registry and headers to 1.0.42Jason Ekstrand2017-02-272-133/+2030
| | | | This brings in a bunch of new extensions
* nir: Delete unused arg in get_iterationElie TOURNIER2017-02-271-2/+2
| | | | | | | nir_const_value is not needed in get_iteration Signed-off-by: Elie Tournier <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* docs: fix a few typosEric Engestrom2017-02-279-13/+13
| | | | | | | Noticed a couple, found the rest using vimspell. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/u_queue: set num_threads correctly if not all threads startGrazvydas Ignotas2017-02-271-1/+1
| | | | | | | | | If i-th thread could not be created it means we have i threads, not i+1, because we start from 0. Fixes: 404d0d5 "gallium/u_queue: add an option to have multiple worker threads" Signed-off-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/u_queue: fix a crash with atexit handlersGrazvydas Ignotas2017-02-271-0/+1
| | | | | | | | | | | | | | | | Commit 4aea8fe ("gallium/u_queue: fix random crashes when the app calls exit()") added a atexit handler which calls util_queue_killall_and_wait() for each queue to stop the threads. However the app is also free to use atexit handlers to clean up things, leading to util_queue_destroy() call which will also call util_queue_killall_and_wait() for the same queue again, causing threads being joined twice, and that is undefined. This happens with libglut, for example. A simple fix is to just set num_threads to 0 as there are no more valid threads after util_queue_killall_and_wait() returns. Fixes: 4aea8fe "gallium/u_queue: fix random crashes when the app calls exit()" Signed-off-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* radv: Use correct size for availability flag.Bas Nieuwenhuizen2017-02-271-2/+5
| | | | | | | | | | Per spec, VK_QUERY_RESULT_64_BIT specifies the integer size and the availability flag is an integer. We apparently handled this correctly already for the copy to buffer case. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Cc: 13.0 17.0 <[email protected]>
* radv: Only use PKT3_OCCLUSION_QUERY when it doesn't hang.Bas Nieuwenhuizen2017-02-271-20/+45
| | | | | | | | | | | | | PKT3_OCCLUSION_QUERY hangs when used in a nested IB. This only calls it when in a primary command buffer and we change GetQueryPoolResults to not need it. CmdCopyQueryPoolResults still needs it so we break that behavior for secondary command buffers. However, that would hang already and using an unitialized value is better than a hang. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Cc: 13.0 17.0 <[email protected]>
* radv: Reset emitted compute pipeline when calling secondary cmd buffer.Bas Nieuwenhuizen2017-02-271-0/+1
| | | | | | | | | Otherwise if the new compute pipeline is the same as the last used pipeline before the call, we don't emit it again. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Cc: 13.0 17.0 <[email protected]>
* radv: add support for NV_dedicated_allocationDave Airlie2017-02-274-20/+62
| | | | | | | | | This adds initial support for NV_dedicated_allocation, then uses it for the wsi image/memory allocation paths internally in the driver. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/winsys: fix freeing imported memory.Andres Rodriguez2017-02-271-0/+2
| | | | | | | | This bo->fd wasn't setting some stuff correctly that could lead to crashes for anything using this path later. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vulkan/wsi/radv: add initial prime support (v1.1)Dave Airlie2017-02-2710-21/+225
| | | | | | | | | | | | | | | | | | | This is a complete rewrite of my previous rfc patches. This adds the ability to present to a different GPU that rendering using a driver side operation that can copy from the tiled to linear shared image. This does prime support completely in the swapchain present code, and each queue has a precreated command buffer for each image and for the each queue family. This means presenting should work on graphics and compute queues and transfer in the future. v1.1: initialise needs_linear_copy in swapchain. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Mike Lothian <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: Add integer->integer casts.Bas Nieuwenhuizen2017-02-261-0/+18
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Acked-by: Edward O'Callaghan <[email protected]>
* check: add support for running test as standaloneEric Engestrom2017-02-262-0/+10
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* check: make any failure fatalEric Engestrom2017-02-262-0/+2
| | | | | | | Previously, only the last error code was returned. Using `set -e` makes the script quit on any unhandled error. Signed-off-by: Eric Engestrom <[email protected]>
* check: mark two tests are requiring bashEric Engestrom2017-02-262-2/+2
| | | | | | | Requirement was removed just before pushing, but it's actually needed for heredocs (`<<<`). Signed-off-by: Eric Engestrom <[email protected]>
* st/nine: Drop USER_INDEX_BUFFERS checkMike Lothian2017-02-252-3/+1
| | | | | | | | | | | | | | | | | | | | | | | This fixes 4a883966c1f74f43afc145d2c3d27af7b8c5e01a where the PIPE_CAP was removed. Now USER_INDEX_BUFFERS are always enabled remove the check and only check for cmst_active directly. v2: Axel pointed out the code was still needed when cmst was inactive, Rebase on master too v3: Drop struct member user_ibufs also && fixup shortlog (Edward). v4: Fix negation v5: Use the right variable name csmt != cmst Fixes: 4a883966c1f7 ("gallium: remove PIPE_CAP_USER_INDEX_BUFFERS") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99953 Reported-and-tested-by: Vinson Lee <[email protected]> (v1) Cc: Marek Olšák <[email protected]> Cc: Axel Davy <[email protected]> Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Mike Lothian <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* st/nine: make use of common uploaders v4Constantine Charlamov2017-02-254-74/+37
| | | | | | | | | | Make use of common uploaders that landed recently to Mesa v2: fixed formatting, broken due to thunderbird configuration v3: per Axel comment: added a comment into NineDevice9_DrawPrimitiveUP v4: per Axel comment: changed style of the comment
* compiler: style clean-ups in blob.hTimothy Arceri2017-02-251-21/+21
| | | | Reviewed-by: Elie Tournier <[email protected]>
* svga: fix MSVC build error after PIPE_CAP_USER_INDEX_BUFFERS removalBrian Paul2017-02-241-1/+1
| | | | | | | Need to specify the zero for the struct initializer. My earlier test of the patch series was with MinGW, not MSVC. Trivial.
* vc4: Lazily emit our FS/VS input loads.Eric Anholt2017-02-244-75/+93
| | | | | | | | | | | | | | | | | | | This reduces register pressure in both types of shaders, by reordering the input loads from the var->data.driver_location order to whatever order they appear first in the NIR shader. These instructions aren't reorderable at our QIR scheduling level because the FS takes two in lockstep to do an interpolation, and the VS takes multiple read instructions in a row to get a whole vec4-level attribute read. shader-db impact: total instructions in shared programs: 76666 -> 76590 (-0.10%) instructions in affected programs: 42945 -> 42869 (-0.18%) total max temps in shared programs: 9395 -> 9208 (-1.99%) max temps in affected programs: 2951 -> 2764 (-6.34%) Some programs get their max temps hurt, depending on the order that the load_input intrinsics appear, because we end up being unable to copy propagate an older VPM read into its only use.
* vc4: Refactor the load_input code out of the intrinsic code.Eric Anholt2017-02-241-25/+42
| | | | It's going gain most of ntq_setup_inputs(), so simplify it first.
* vc4: Track the last block we emitted at the top level.Eric Anholt2017-02-243-5/+10
| | | | | This will be used for delaying our VPM reads (which must be unconditional) until just before they're used.
* vc4: Emit max number of temps in the shader-db output.Eric Anholt2017-02-241-0/+23
| | | | | | | We need to be paying attention to optimization's impact on this -- even if we reduce instruction count, increasing max temps in general is likely to cause us to fail to register allocate on some shaders, which means that those won't run at all.
* util/disk_cache: Use backward compatible st_mtime.Vinson Lee2017-02-241-1/+1
| | | | | | | | | | | | | | | | Fix Mac OS X build error. CC libmesautil_la-disk_cache.lo In file included from disk_cache.c:46: ./disk_cache.h:57:20: error: no member named 'st_mtim' in 'struct stat' *timestamp = st.st_mtim.tv_sec; ~~ ^ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99918 Fixes: 207e3a6e4b ("util/radv: move *_get_function_timestamp() to utils") Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl: Fix missing-braces warning.Vinson Lee2017-02-241-1/+1
| | | | | | | | | CXX glsl/ast_to_hir.lo glsl/ast_to_hir.cpp: In member function 'virtual ir_rvalue* ast_declarator_list::hir(exec_list*, _mesa_glsl_parse_state*)': glsl/ast_to_hir.cpp:4846:42: warning: missing braces around initializer for 'unsigned int [16]' [-Wmissing-braces] Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Andres Gomez <[email protected]>
* ac: silence a warningMarek Olšák2017-02-251-2/+1
| | | | trivial
* radeonsi: fix broken tessellation on Carrizo and StoneyMarek Olšák2017-02-251-1/+3
| | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99850 Cc: 13.0 17.0 <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* st/mesa: don't update unrelated states in non-draw calls such as ClearMarek Olšák2017-02-256-4/+21
| | | | | | | | | | If a VAO isn't bound and u_vbuf isn't enabled because of the Core profile, we'll get user vertex buffers in drivers if we update vertex buffers in glClear. So don't do that. This fixes a regression since disabling u_vbuf for Core profiles. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: set blend state for PBO readbacksMarek Olšák2017-02-251-0/+6
| | | | | | | v2: restore the state Cc: 13.0 17.0 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: reset sample_mask, min_sample, and render_condition for PBO opsMarek Olšák2017-02-252-0/+13
| | | | | Cc: 13.0 17.0 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: don't check st->vp in update_clipMarek Olšák2017-02-251-4/+2
| | | | | | | The clip state is updated before VS, so it can be NULL for the first draw call. Just remove the unnecessary dependency on st->vp. Reviewed-by: Brian Paul <[email protected]>