summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nir/lower_gs_intrinsics: Use nir_builder control-flow helpersJason Ekstrand2017-03-011-6/+3
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* glsl/nir: Use nir_builder's new control-flow helpersJason Ekstrand2017-03-011-27/+11
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* nir/builder: Add support for easily building control-flowJason Ekstrand2017-03-011-0/+95
| | | | | | | | | | | Each of the pop functions (and push_else) take a control flow parameter as their second argument. If NULL, it assumes that the builder is in a block that's a direct child of the control-flow node you want to pop off the virtual stack. This is what 90% of consumers will want. The SPIR-V pass, however, is a bit more "creative" about how it walks the CFG and it needs to be able to pop multiple levels at a time, hence the argument. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* i965: Move intel_debug.h to intel/common/gen_debug.hJason Ekstrand2017-03-0121-23/+26
| | | | | | | | | | This is shared between the Vulkan and GL drivers as it's a requirement of the back-end compiler. However, it doesn't really belong in the compiler. We rename the file to match the prefix of the other stuff in common and because libdrm defines an intel_debug.h and this avoids a pile of possible name conflicts. Reviewed-by: Anuj Phogat <[email protected]>
* i965: Reduce cross-pollination between the DRI driver and compilerJason Ekstrand2017-03-0157-52/+34
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move select_clip_planes to brw_vs.cJason Ekstrand2017-03-012-25/+26
| | | | Reviewed-by: Matt Turner <[email protected]>
* i965: Delete brw_do_cubemap_normalizeJason Ekstrand2017-03-013-124/+0
| | | | | | | This hasn't been used for quite some time now but we never bothered to get rid of it when we dropped GLSL IR support for vec4. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add a header for brw_vec4_vs_visitorJason Ekstrand2017-03-015-44/+71
| | | | | | | brw_vs.h is not a compiler file but brw_vec4_visitor is definitely a compiler thing. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move a bunch of pre-compile and link stuff to brw_program.hJason Ekstrand2017-03-012-14/+15
| | | | | | It's all GL-specific and brw_program.h is not part of i965_compiler. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move image uniform setup to brw_nir_uniforms.cppJason Ekstrand2017-03-012-51/+51
| | | | | | It's the only thing that's using it. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move channel_expressions and vector_splitting to brw_program.hJason Ekstrand2017-03-014-3/+5
| | | | | | They're GL-specific. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Make mark_surface_used a static inline in brw_compiler.hJason Ekstrand2017-03-012-13/+13
| | | | | | | One of these days, I'd like to see this function go away all together but for now, let's at least put it near the struct it updates. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move BRW_ATTRIB_WA_* defines to brw_compiler.hJason Ekstrand2017-03-013-13/+13
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move BRW_MAX_DRAW_BUFFERS to brw_compiler.hJason Ekstrand2017-03-012-3/+3
| | | | | | | | | It does sort-of go with MAX_UBO and friends but MAX_DRAW_BUFFERS is an actual hardware constant based on the number of things we can blend rather than an arbitrary "number of things allowed in GL" like some of the other maximums are. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/inst: Stop using fi_typeJason Ekstrand2017-03-011-2/+8
| | | | | | | It's a mesa define that's trivial to inline. This removes a dependence on main/imports.h. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move brw_register_blocks to brw_fs.cppJason Ekstrand2017-03-012-11/+11
| | | | | | Its one and only caller is brw_compile_fs which lives there. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move SHADER_TIME_STRIDE to brw_compiler.hJason Ekstrand2017-03-015-15/+15
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move SOL binding #defines to brw_compiler.hJason Ekstrand2017-03-015-30/+33
| | | | | | | | While we're at it, we also change the GEN6 binding macro to be a start index that gets added to the binding. This makes things a bit more explicit. Reviewed-by: Kenneth Graunke <[email protected]>
* i964/gs: Move MAX_GS_INPUT_VERTICES to brw_vec4_gs_visitor.hJason Ekstrand2017-03-012-2/+2
| | | | | | It's only users are in brw_vec4_gs_visitor and gen6_vec4_gs_visitor. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gs: Add the gl_prim_to_hw_prim table to vec4_gs_visitor.cppJason Ekstrand2017-03-011-1/+19
| | | | | | | | | It's currently in brw_util.c but that's the only bit of brw_util.c that's shared between the compiler and the rest of the GL driver. It's just a fairly obvious table so the duplication isn't bad. It's certainly less pain than trying to figure out how to share the code. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Don't use MAX_SURFACES in mark_surface_usedJason Ekstrand2017-03-011-1/+4
| | | | | | | Vulkan doesn't respect MAX_SURFACES so this assert isn't valid in that case. It should, however, assert that it isn't insanely large. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Get rid of BRW_PRIM_OFFSETJason Ekstrand2017-03-012-14/+2
| | | | | | | This is a relic of when we wired up meta to be able to use RECTLIST primitives. It's no longer needed. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vue_map: Stop using GLbitfield typesJason Ekstrand2017-03-012-9/+9
| | | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965: Move assign_common_binding_table_offsets to brw_programJason Ekstrand2017-03-014-93/+94
| | | | | | | | | | This isn't used by Vulkan and is specific to the way the GL driver works. There's no reason to have it in common compiler code. Also, it relies on BRW_MAX_* defines which are defined in brw_context.h Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965: Move some gen4 WM defines to brw_compiler.hJason Ekstrand2017-03-014-42/+46
| | | | | | | | These go in wm_prog_key so they're part of the compiler interface. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965: Move brw_disassemble_inst to brw_eu.hJason Ekstrand2017-03-012-4/+2
| | | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965: Move some helpers from brw_context.h to brw_shader.hJason Ekstrand2017-03-013-16/+18
| | | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i965: Move a couple of #defines from brw_context to brw_compilerJason Ekstrand2017-03-012-18/+16
| | | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* 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]>