summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* anv: Pull all clflushing into a clflush_range helperJason Ekstrand2017-02-212-20/+13
| | | | | | | All this cache line address calculation stuff is tricky. Let's not duplicate it more places than we have to. Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Remove the unused state_pool_emit macroJason Ekstrand2017-02-211-14/+0
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv: Rename clflush_range and state_clflushJason Ekstrand2017-02-2110-29/+29
| | | | | | | | It's a bit shorter and easier to work with. Also, we're about to add a helper called clflush which does the clflush but without any memory fencing. Reviewed-by: Lionel Landwerlin <[email protected]>
* intel/blorp: Explicitly flush all allocated stateJason Ekstrand2017-02-213-1/+37
| | | | | | | | Found by inspection. However, I expect it fixes real bugs when using blorp from Vulkan on little-core platforms. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* anv: Put everything about queries in genX_query.cJason Ekstrand2017-02-214-478/+484
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/Makefile: alphabetizeJason Ekstrand2017-02-211-4/+4
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* anv/query: Perform CmdResetQueryPool on the GPUJason Ekstrand2017-02-212-22/+30
| | | | | | | This fixes a some rendering corruption in The Talos Principle Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* genxml: Make MI_STORE_DATA_IMM more consistentJason Ekstrand2017-02-213-3/+3
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* anv/query: clflush the bo map on non-LLC platformsJason Ekstrand2017-02-211-0/+3
| | | | | | | Found by inspection Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* anv: Add an invalidate_range helperJason Ekstrand2017-02-211-0/+13
| | | | | | | | This is similar to clflush_range except that it puts the mfence on the other side to ensure caches are flushed prior to reading. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* etnaviv: remove number of pixel pipes validationChristian Gmeiner2017-02-211-10/+0
| | | | | | | | | | | | | This validation was added before the etnaviv drm driver landed in the linux kernel. Due some pre-merge API changes we had to fix-up this value but with a mainline kernel this is not a problem anymore. Lets remove that validation which also gets rid of problem caught by Coverity, reported to me by imirkin. Cc: "17.0" <[email protected]> Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* etnaviv: move pctx initialisation to avoid a null dereferenceChristian Gmeiner2017-02-211-6/+6
| | | | | | | | | | | In case ctx->stream == NULL the fail label gets executed where pctx gets dereferenced - too bad pctx is NULL in that case. Caught by Coverity, reported to me by imirkin. Cc: "17.0" <[email protected]> Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* etnaviv: add missing fallthrough annotationChristian Gmeiner2017-02-211-0/+1
| | | | | | | Caught by Coverity, reported to me by imirkin. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* radv: make radv_resolve_entrypoint staticEmil Velikov2017-02-212-2/+1
| | | | | | | | Used only within the generated source file. Fixes: 12301c54186 ("radv: drop the RADV_CALL macro.") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* radv: remove unused radv_dispatch_table dtableEmil Velikov2017-02-212-3/+0
| | | | | | Fixes: 12301c54186 ("radv: drop the RADV_CALL macro.") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* anv: remove unused anv_dispatch_table dtableEmil Velikov2017-02-212-4/+0
| | | | | | Fixes: 4c9dec80ede ("anv: Get rid of the ANV_CALL macro") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* i915: remove extern "C" guardsEmil Velikov2017-02-215-40/+0
| | | | | | | None of this code is used in C++ context. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i915: remove 'virtual' and extern C workaroundsEmil Velikov2017-02-211-9/+4
| | | | | | | Analogous to previous commit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: remove 'virtual' and extern C workaroundsEmil Velikov2017-02-211-13/+3
| | | | | | | The headers are properly annotated thus we don't need these. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: add extern C notation in headersEmil Velikov2017-02-213-0/+22
| | | | | | | | | | | Otherwise symbols wont be annotated with C linkage and we'll fail at link time. Currently this is worked around by wrapping the header inclusion itself. The latter in itself fragile and not recommended. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: do not #include foo.h within extern C {}Emil Velikov2017-02-211-2/+2
| | | | | | | | Analogous to previous commit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nir: do not #include util/debug.h within extern C {}Emil Velikov2017-02-211-1/+4
| | | | | | | | It's a problem waiting to happen. Individual headers should be annotated if needed. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl: resolve extern C workarounds/hacksEmil Velikov2017-02-213-8/+4
| | | | | | | | Do not wrap header inclusion in extern C since it can cause issues. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: move extern C wrappers where applicableEmil Velikov2017-02-212-7/+7
| | | | | | | | | Namely, after the include directives. The headers are properly annotated so keeping things as-is is only asking for trouble. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/tests: remove unneeded extern C { #include foo } hackEmil Velikov2017-02-211-2/+0
| | | | | | | | The header itself (enums.h) is already properly annotated. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove unneeded extern C {} wrapperEmil Velikov2017-02-211-10/+0
| | | | | | | | | | compiler.h defines a few mesa specific macros which are not C specific. This allows us to avoid buggy extern C { #include $system_header } constructs. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: annotate functions for C linkageEmil Velikov2017-02-211-0/+8
| | | | | | | | | | i.e. add extern C {} in program/symbol_table.h It will allow us remove a workaround we have elsewhere in the code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* anv: remove unneeded extern C notationEmil Velikov2017-02-211-8/+0
| | | | | | | | Analogous to previous commit - never used in any C++ code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radv: remove unneeded extern C notationEmil Velikov2017-02-211-7/+1
| | | | | | | Header is never #include(d) by a C++ source. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl/tests: Add UINT64 and INT64 typesRhys Kidd2017-02-211-0/+18
| | | | | | | | | | | | glsl/tests/uniform_initializer_utils.cpp:83:14: warning: enumeration value ‘GLSL_TYPE_UINT64’ not handled in switch [-Wswitch] switch (type->base_type) { ^ glsl/tests/uniform_initializer_utils.cpp:83:14: warning: enumeration value ‘GLSL_TYPE_INT64’ not handled in switch [-Wswitch] Fixes: 8ce53d4a2f3 ("glsl: Add basic ARB_gpu_shader_int64 types") Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Elie Tournier <[email protected]>
* radeonsi: fix UINT/SINT clamping for 10-bit formats on <= CIKNicolai Hähnle2017-02-216-19/+43
| | | | | | | | | | The same PS epilog workaround as for 8-bit integer formats is required, since the CB doesn't do clamping. Fixes GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels*. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: handle MultiDrawIndirect in si_get_draw_start_countNicolai Hähnle2017-02-211-7/+53
| | | | | | | | | | | | | | | | | | | | | Also handle the GL_ARB_indirect_parameters case where the count itself is in a buffer. Use transfers rather than mapping the buffers directly. This anticipates the possibility that the buffers are sparse (once ARB_sparse_buffer is implemented), in which case they cannot be mapped directly. Fixes GL45-CTS.gtf43.GL3Tests.multi_draw_indirect.multi_draw_indirect_type on <= CIK. v2: - unmap the indirect buffer correctly - handle the corner case where we have indirect draws, but all of them have count 0. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]> Acked-by: Edward O'Callaghan <[email protected]>
* winsys/amdgpu: reduce max_alloc_size based on GTT limitsNicolai Hähnle2017-02-211-2/+4
| | | | | | | | | | | | Allocating huge buffers in VRAM is not a problem, but when those buffers start being migrated, the kernel runs into errors because it cannot split those buffer up for moving through GTT. This should fix intermittent failures of GL45-CTS.texture_buffer.texture_buffer_max_size Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* radv: Don't flush at the start of a command buffer.Bas Nieuwenhuizen2017-02-211-15/+0
| | | | | | | The preamble flushes now and the rest is the responsibility of the app. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Flush in the initial preamble CS.Bas Nieuwenhuizen2017-02-213-90/+148
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Special case the initial preamble.Bas Nieuwenhuizen2017-02-214-15/+22
| | | | | | | For flushing we don't want to flush every third IB. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Split emitting the cache flush out.Bas Nieuwenhuizen2017-02-211-64/+77
| | | | | | | So that we can use it without a cmd_buffer. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Free empty_cs on device destruction.Bas Nieuwenhuizen2017-02-211-0/+2
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* nvc0: use PascalB for most Pascal boardsBen Skeggs2017-02-212-1/+9
| | | | Signed-off-by: Ben Skeggs <[email protected]>
* radv: handle subpass cache flushesDave Airlie2017-02-211-48/+63
| | | | | | | | | | | | | | | | This splits out the cache flush bit setting code dependent on the src/dest access flags. It then calls it from the subpass barrier code. It also marks a TODO to remove the aggressive CS/PS flushes at some point. This fixes a bunch of the dEQP-VK.renderpass.attachment_allocation.input_output.* tests. Signed-off-by: Dave Airlie <[email protected]>
* r300g: only allow byteswapped formats on big endianGrazvydas Ignotas2017-02-211-0/+5
| | | | | | | | | They cause regressions on little endian. Fixes: 172bfdaa9e ("r300g: add support for PIPE_FORMAT_x8R8G8B8_*") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98869 Signed-off-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: remove unused variable warning in release buildsTimothy Arceri2017-02-211-7/+2
| | | | | | | | | | This assert might have made sense before but we no longer use gl_linked_shader here. Unless the caller has really done something crazy this assert is fairly useless. We also do some small tidy ups in this change. Reviewed-by: Marek Olšák <[email protected]>
* gallivm: Reenable PPC VSX (v3)Ben Crocker2017-02-201-1/+13
| | | | | | | | | | | | | | | Reenable the PPC64LE Vector-Scalar Extension for LLVM versions >= 3.8.1, now that LLVM bug 26775 and its corollary, 25503, are fixed. Amendment: remove extraneous spaces in macro def & invocations. We would prefer a runtime check, e.g. via an LLVMQueryString (analogous to glGetString, eglQueryString) or LLVMGetVersion API, but no such API exists at this time. Signed-off-by: Ben Crocker <[email protected]> [Emil Velikov: remove LLVM_VERSION macro] Signed-off-by: Emil Velikov <[email protected]>
* gallivm: Override getHostCPUName() "generic" w/ "pwr8" (v4)Ben Crocker2017-02-201-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | If llvm::sys::getHostCPUName() returns "generic", override it with "pwr8" (on PPC64LE). This is a work-around for a bug in LLVM: a table entry for "POWER8NVL" is missing, resulting in (big-endian) "generic" being returned on little-endian Power8NVL systems. The result is that code that attempts to load the least significant 32 bits of a 64-bit quantity in memory loads the wrong half. This omission should be fixed in the next version of LLVM (4.0), but this work-around should be left in place in case some future version of POWER<n> also ends up unrepresented in LLVM's table. This workaround fixes failures in the Piglit arb_gpu_shader_fp64 conversion tests on POWER8NVL processors. (V4: add similar comment in the code.) Signed-off-by: Ben Crocker <[email protected]> Cc: 12.0 13.0 17.0 <[email protected]> Acked-by: Emil Velikov <[email protected]>
* gallivm: Improve debug output (V2)Ben Crocker2017-02-202-1/+18
| | | | | | | | | | | | | | | Improve debug output from gallivm_compile_module and lp_build_create_jit_compiler_for_module, printing the -mcpu and -mattr options passed to LLC. V2: enclose MAttrs debug_printf block and llc -mcpu debug_printf in "if (gallivm_debug & <flags>)..." Signed-off-by: Ben Crocker <[email protected]> Cc: 12.0 13.0 17.0 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> (v2) [Emil Velikov: rebase] Signed-off-by: Emil Velikov <[email protected]>
* gallium/u_suballoc: update commentsMarek Olšák2017-02-201-3/+5
| | | | as requested by Brian. Trivial.
* util/build-id: define ElfW and NT_GNU_BUILD_ID if neededJonathan Gray2017-02-201-0/+8
| | | | | | | | | Define ElfW() and NT_GNU_BUILD_ID if needed as these defines are not present on at least OpenBSD and FreeBSD. Fixes the build on OpenBSD. Fixes: d4fa083e11f ("util: Add utility build-id code.") Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* android: glsl: build shader cache sourcesMauro Rossi2017-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Fixes the following building errors: external/mesa/src/compiler/glsl/linker.cpp:4642: error: undefined reference to 'shader_cache_read_program_metadata(gl_context*, gl_shader_program*)' external/mesa/src/mesa/program/ir_to_mesa.cpp:3135: error: undefined reference to 'shader_cache_write_program_metadata(gl_context*, gl_shader_program*)' clang++: error: linker command failed with exit code 1 ... external/mesa/src/mesa/program/ir_to_mesa.cpp:3135: error: undefined reference to 'shader_cache_write_program_metadata(gl_context*, gl_shader_program*)' external/mesa/src/compiler/glsl/linker.cpp:4642: error: undefined reference to 'shader_cache_read_program_metadata(gl_context*, gl_shader_program*)' clang++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1 Fixes: 9f8dc3bf03e ("utils: build sha1/disk cache only with Android/Autoconf") Acked-by: Emil Velikov <[email protected]>
* android: radeonsi: fix sid_table.h generated header include pathMauro Rossi2017-02-201-1/+3
| | | | | | | | | | | | | | | generated-sources-dir-for macro replaces intermediates-dir-for and LOCAL_MODULE_CLASS is defined as required by new macro, in order to avoid the following building error: external/mesa/src/gallium/drivers/radeonsi/si_debug.c:29:10: fatal error: 'sid_tables.h' file not found ^ 1 error generated. Fixes: 730574c58e8 ("android: ac/debug: move sid_tables.h generation and IB decode to amd/common") Acked-by: Nicolai Hähnle <[email protected]> Acked-by: Emil Velikov <[email protected]>
* vulkan/wsi/x11: add support to detect if we can support rendering (v3)Dave Airlie2017-02-2014-10/+98
| | | | | | | | | | | | | | | | | This adds support to radv_GetPhysicalDeviceXlibPresentationSupportKHR and radv_GetPhysicalDeviceXcbPresentationSupportKHR to check if the local device file descriptor is compatible with the descriptor retrieved from the X server via DRI3. This will stop radv binding to an X server until we have prime support in place. Hopefully apps use this API before trying to render things. v2: drop unneeded function, don't leak memory. (jekstrand) v3: also check in surface_get_support callback. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>