summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl/int64: Fix a typo in imod64Jason Ekstrand2017-03-012-15/+9
| | | | | | | The zy swizzle gives us one component of quotient and one component of remainder. What we wanted was zw for the remainder. Reviewed-by: Matt Turner <[email protected]>
* util/build-id: Return a pointer rather than copying the dataJason Ekstrand2017-03-013-8/+6
| | | | | | | | We're about to use the build-id as the starting point for another SHA1 hash in the Intel Vulkan driver, and returning a pointer is far more convenient. Reviewed-by: Chad Versace <[email protected]>
* anv: Properly handle destroying NULL devices and instancesJason Ekstrand2017-03-011-0/+6
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "17.0 13.0" <[email protected]>
* mesa: Fix performance query id checkRobert Bragg2017-03-011-2/+6
| | | | | | | | | | | | | | | | | | | | The queryid_valid() function asserts that an ID given by an application isn't zero since the spec explicitly reserves an ID of zero as invalid. The implementation was written as if the ID was a signed integer and based on the assumption that queryid_to_index() is simply subtracting one from the ID. It was broken because in fact the ID was stored in an unsigned int and testing for an index >= 0 would always succeed. This adds a spec quote to clarify why zero is considered invalid and checks for zero before even passing the ID to queryid_to_index() for then checking the upper bound. This is a v2 of a patch originally posted by Juha-Pekka (thanks) Cc: Juha-Pekka Heikkila <[email protected]> Signed-off-by: Robert Bragg <[email protected]> Reviewed-by: Plamena Manolova <[email protected]>
* amd/common: Fix build with new ac_add_function_attr()Tobias Klausmann2017-03-013-3/+5
| | | | | | | | | | | | | Fix usage of ac_add_function_attr() and make it known! common/ac_nir_to_llvm.c: In function 'create_llvm_function': common/ac_nir_to_llvm.c:265:4: error: implicit declaration of function 'ac_add_function_attr' [-Werror=implicit-function-declaration] ac_add_function_attr(main_function, i + 1, AC_FUNC_ATTR_BYVAL); ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Tobias Klausmann <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* egl/wayland: Don't use DRM format codes for SHMDaniel Stone2017-03-011-6/+15
| | | | | | | | | | | | | | | | | | The wl_drm interface (akin to X11's DRI2) uses the standard set of DRM FourCC format codes. wl_shm copies this, except for ARGB8888/XRGB8888, which use their own definitions. Make sure we only use wl_shm format codes when we're working with wl_shm. Otherwise, using swrast with 32bpp formats would fail with an error. Cc: [email protected] Signed-off-by: Daniel Stone <[email protected]> (v1) Fixes: cb5e799448 ("egl/wayland: unify dri2_wl_create_surface implementations") v2: [Emil Velikov: move to dri2_wl_create_window_surface] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> (IRC)
* mesa: Drop unused STATE_TEXRECT_SCALE program statevars.Kenneth Graunke2017-03-012-24/+0
| | | | | | | The last user is now gone. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* i965: Drop unused STATE_TEXRECT_SCALE code.Kenneth Graunke2017-03-013-27/+0
| | | | | | | | | | | | | | In the past, we used this on Gen4-5 to transform non-normalized texture coordinates (for sampler2DRect) to normalized ones. We also used it on Gen6-7.5 for sampler2DRect with GL_CLAMP. Jason dropped this code in 6c8ba59cff14a1a86273f4008ff2a8e68335ab25 in favor of using nir_lower_tex(), which just does a textureSize() call. But we were still setting up these state references for useless uniform data. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* egl: Ensure ResetNotificationStrategy matches for shared contexts.Kenneth Graunke2017-03-011-0/+14
| | | | | | | | | | Fixes: dEQP-EGL.functional.robustness.negative_context.invalid_robust_shared_context_creation Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Cc: [email protected]
* gallivm,ac: add function attributes at call sites instead of declarationsMarek Olšák2017-03-018-102/+177
| | | | | | | | | | | | | | | | They can vary at call sites if the intrinsic is NOT a legacy SI intrinsic. We need this to force readnone or inaccessiblememonly on some amdgcn intrinsics. This is only used with LLVM 4.0 and later. Intrinsics only used with LLVM <= 3.9 don't need the LEGACY flag. gallivm and ac code is in the same patch, because splitting would be more complicated with all the LEGACY uses all over the place. v2: don't change the prototype of lp_add_function_attr. Reviewed-by: Jose Fonseca <[email protected]> (v1)
* gallivm,ac: remove unused FUNC_ATTR_LAST enumsMarek Olšák2017-03-012-2/+0
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: inform the driver of framebuffer changes before compute dispatchesNicolai Hähnle2017-03-011-1/+9
| | | | | | | | | | | | | | | | | | | Even though compute shaders cannot access the framebuffer, there is a synchronization issue when a compute dispatch accesses a texture that was previously bound and drawn to as a framebuffer. Section 9.3 (Feedback Loops Between Textures and the Framebuffer) of the OpenGL 4.5 spec rather implicitly clarifies that undefined behavior results if the texture is still attached to the currently bound framebuffer. However, the feedback loop is broken when the application changes the framebuffer binding before a compute dispatch, and the state tracker needs to let the driver known about this. Fixes GL45-CTS.compute_shader.pipeline-post-fs on SI family Radeons. Cc: [email protected] Signed-off-by: Marek Olšák <[email protected]>
* st/glsl_to_tgsi: avoid iterating past the head of the instruction listNicolai Hähnle2017-03-011-2/+9
| | | | | | | | | | | exec_node::get_prev() does not guard against going past the beginning of the list, so we need to add explicit checks here. Found by ASAN in piglit arb_shader_storage_buffer_object-rendering. Cc: [email protected] Signed-off-by: Marek Olšák <[email protected]>
* r600g: fix build without opencl and static llvm libsMarc Dietrich2017-03-011-1/+1
| | | | | | | | | | radeon_llvm_check and friends were never called in the no-opencl case, which ended up with an empty llvm module list. As --enable-opencl always requires --enable-llvm, we can use the latter as the guard. Signed-off-by: Marc Dietrich <[email protected]> [Emil Velikov: commit message polish] Reviewed-by: Emil Velikov <[email protected]>
* glsl: remove unecessary flags.q.subroutine_defSamuel Pitoiset2017-03-015-10/+7
| | | | | | | | | | | | | | | This bit is definitely not necessary because subroutine_list can be used instead. This frees one more bit in the flags.q struct which is nice because arb_bindless_texture will need 4 bits for the new layout qualifiers. No piglit regressions found (including compiler tests) with "-t subroutine". v2: set the subroutine flag for validating illegal flags Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* vulkan: provide vk.xml as argument to the python generatorEmil Velikov2017-02-283-5/+4
| | | | | | | | | | | Do not hardcode the file in the python script, but pass it via the build system(s). The latter is the only one that should know about the file location/tree structure. Cc: Dylan Baker <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* automake: vulkan: rename/reuse VULKAN_UTIL_{GENERATED_,}FILES listEmil Velikov2017-02-283-7/+5
| | | | Signed-off-by: Emil Velikov <[email protected]>
* android: vulkan: add support for libmesa_vulkan_utilMauro Rossi2017-02-285-6/+74
| | | | | | | | | | | | | | | | | | | | The following changes are implemented: Add src/vulkan/Android.mk to build libmesa_vulkan_util Android.mk: add src/vulkan to SUBDIR to build new module intel/vulkan: fix libmesa_vulkan_util,vk_enum_to_str.h dependencies Add -o OUTPUT_PATH option in src/vulkan/util/gen_enum_to_str.py script Use -o OUTPUT_PATH option in automake generation rules for vk_enum_to_str.{c,h} Fixes: e9dcb17 "vulkan/util: Add generator for enum_to_str functions" Fixes: 8e03250 "vulkan: Combine wsi and util makefiles" Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> [Emil Velikov] - Move parser within main() - Use --outdir instead of -o Signed-off-by: Emil Velikov <[email protected]>
* automake: r600: radeonsi: correctly manage libamd_common.la linkingEmil Velikov2017-02-282-4/+5
| | | | | | | | | | | | | | | | | Since both r600 and radeonsi use code from libamd_common they need to static link it. At the same time, adding a common library to LIB_DEPS is fragile [can lean to multiple symbol definitions] and non-obvious - I had to do a double-take how things work atm. So follow the libradeon.la approach and put common libraries in TARGET_RADEON_COMMON Fixes: 936f5407a7d ("gallium/radeon: Add libamd_common.a to TARGET_LIB_DEPS also for r600") Cc: Timothy Arceri <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Marek Olšák <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Tested-by: Michel Dänzer <[email protected]>
* glx/tests: automake: add dispatch-index-check to the tarballEmil Velikov2017-02-281-0/+1
| | | | | | | Otherwise we'll fail at `make distcheck' Fixes: 3cc33e76401 ("glx: add GLXdispatchIndex sort check") Signed-off-by: Emil Velikov <[email protected]>
* automake: anv: add missing include $(top_srcdir)/src/vulkan/utilEmil Velikov2017-02-281-0/+1
| | | | | | | Otherwise we'll fail to find the header and `make distcheck` will bail. Fixes: e9dcb17962f ("vulkan/util: Add generator for enum_to_str functions") Signed-off-by: Emil Velikov <[email protected]>
* i965/fs: emit MOV_INDIRECT with the source with the right register typeSamuel Iglesias Gonsálvez2017-03-011-1/+1
| | | | | | | | This was hiding bugs as it retyped the source to destination's type. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Cc: "17.0" <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/fs: fix source type when emitting MOV_INDIRECT to read ICP handlesSamuel Iglesias Gonsálvez2017-03-011-3/+3
| | | | | | | | | | | | | | When generating the MOV INDIRECT instruction, the source type is ignored and it is set to destination's type. However, this is going to change in a later patch, so we need to explicitly set the proper source type. brw_vec8_grf() creates an float type's fs_reg by default, when the ICP handle is actually unsigned. This patch fixes these cases before applying the aforementioned patch. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Cc: "17.0" <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/fs: fix indirect load DF uniforms on BSW/BXTSamuel Iglesias Gonsálvez2017-03-011-21/+20
| | | | | | | | | | | | | | | | | | | | | The lowered BSW/BXT indirect move instructions had incorrect source types, which luckily wasn't causing incorrect assembly to be generated due to the bug fixed in the next patch, but would have confused the remaining back-end IR infrastructure due to the mismatch between the IR source types and the emitted machine code. v2: - Improve commit log (Curro) - Fix read_size (Curro) - Fix DF uniform array detection in assign_constant_locations() when it is acceded with 32-bit MOV_INDIRECTs in BSW/BXT. v3: - Move changes in assign_constant_locations() to other patch. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Cc: "17.0" <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/fs: detect different bit size accesses to uniforms to push them in ↵Samuel Iglesias Gonsálvez2017-03-011-16/+34
| | | | | | | | | | | | | | proper locations Previously, if we had accesses with different sizes to the same uniform, we might not push it aligned with the bigger one. This is a problem in BSW/BXT when we access an array of DF uniform with both direct and indirect addressing because for the latter we use 32-bit MOV INDIRECT instructions. However this problem can happen with other generations and bitsizes. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Cc: "17.0" <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* i965/fs: mark last DF uniform array element as 64 bit live oneSamuel Iglesias Gonsálvez2017-03-011-0/+3
| | | | | | | | | This bug can make that we don't detect the end of a contiguous area correctly and push larger areas than the real ones. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Cc: "17.0" <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* radv: fix txs for sampler buffersDave Airlie2017-03-011-1/+1
| | | | | | | | | I messed this up when I wrote it, this fixes: dEQP-VK.memory.pipeline_barrier.*uniform_texel_buffer.* Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* amd/common: fix ASICREV_IS_POLARIS11_M for Polaris12Marek Olšák2017-02-281-1/+1
| | | | | | Cc: 17.0 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Don't allocate space for unused immutable samplers.Bas Nieuwenhuizen2017-02-281-9/+14
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: Use constants for immutable samplers.Bas Nieuwenhuizen2017-02-281-0/+16
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Detect if all immutable samplers for a binding are equal.Bas Nieuwenhuizen2017-02-282-0/+6
| | | | | | | We can then use constants for indexed loads. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Store the immutable samplers as uint32_t[4].Bas Nieuwenhuizen2017-02-282-10/+6
| | | | | | | So we don't need to know about radv_sampler in ac_nir_to_llvm. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* egl/dri3: implement query surface hookBrendan King2017-02-283-0/+45
| | | | | | | | | | | | | | This is a DRI3 version of a change made for DRI2 (4d6d4f939e0af4252e0b, "egl/dri2: implement query surface hook"), that fixed failures in dEQP-EGL.functional.resize.surface_size.grow and dEQP-EGL.functional.resize.surface_size.shrink. Cc: Tapani Pälli <[email protected]> Cc: Mark Janes <[email protected]> Cc: Chad Versace <[email protected]> Signed-off-by: Brendan King <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Cc: "17.0" <[email protected]>
* gallium/radeon: Add libamd_common.a to TARGET_LIB_DEPS also for r600Michel Dänzer2017-02-282-1/+5
| | | | | | | | | | | | | | | | | | Fixes build failure with --enable-opencl --enable-xvmc: make[4]: Entering directory '/home/daenzer/src/mesa-git/mesa/build-amd64/src/gallium/targets/xvmc' CXXLD libXvMCgallium.la ../../../../src/gallium/drivers/r600/.libs/libr600.a(evergreen_compute.o): In function `evergreen_create_compute_state': /home/daenzer/src/mesa-git/mesa/build-amd64/src/gallium/drivers/r600/../../../../../src/gallium/drivers/r600/evergreen_compute.c:254: undefined reference to `ac_elf_read' ../../../../src/gallium/drivers/r600/.libs/libr600.a(evergreen_compute.o): In function `r600_shader_binary_read_config': /home/daenzer/src/mesa-git/mesa/build-amd64/src/gallium/drivers/r600/../../../../../src/gallium/drivers/r600/evergreen_compute.c:189: undefined reference to `ac_shader_binary_config_start' /home/daenzer/src/mesa-git/mesa/build-amd64/src/gallium/drivers/r600/../../../../../src/gallium/drivers/r600/evergreen_compute.c:189: undefined reference to `ac_shader_binary_config_start' collect2: error: ld returned 1 exit status Makefile:760: recipe for target 'libXvMCgallium.la' failed Fixes: dc4c551a345d ("radeon/ac: switch from radeon_elf_read() to ac_elf_read()") Acked-by: Timothy Arceri <[email protected]> Tested-by: Timothy Arceri <[email protected]>
* i965: Move intel_resolve_map.[ch] from i965_compiler_FILES to i965_FILESKenneth Graunke2017-02-271-3/+3
| | | | | | | | I have no idea why these were part of the compiler files. They're miptree related code, and the compiler doesn't appear to use them. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* gallium/r600: fix r600 build when OpenCL is enabledTimothy Arceri2017-02-281-0/+5
| | | | Fixes build regression caused by d90bf4ef3e1db7
* radeon: remove unused radeon_elf_util.{c,h}Timothy Arceri2017-02-287-256/+0
| | | | | | We now use the shared code in AMD common instead. Reviewed-by: Marek Olšák <[email protected]>
* 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]>