summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: pass input_idx to declare_nir_input_vs()Timothy Arceri2018-01-301-2/+3
| | | | | | | This make it consistent with declare_nir_input_fs() and will allow us to support doubles. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add bitcast_inputs() helperTimothy Arceri2018-01-301-6/+15
| | | | | | Will be used in a following patch to help support doubles. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi/nir: fix num_inputs for doubles in vsTimothy Arceri2018-01-301-5/+8
| | | | Reviewed-by: Marek Olšák <[email protected]>
* nir: partially revert c2acf97fcc9b32eTimothy Arceri2018-01-301-6/+23
| | | | | | | | | | | | | | | | | | c2acf97fcc9b32e changed the use of double_inputs_read to be inconsitent with its previous meaning. Here we re-enable the gather info code that was removed as the modified code from c2acf97fcc9b32e now uses the double_inputs member rather than double_inputs_read. This change allows us to use double_inputs_read with gallium drivers without impacting double_inputs which is used by i965. We also make use of the compiler option vs_inputs_dual_locations to allow for the difference in behaviour between drivers that handle vs inputs as taking up two locations for doubles, versus those that treat them as taking a single location. Reviewed-by: Karol Herbst <[email protected]>
* nir: add vs_inputs_dual_locations compiler optionTimothy Arceri2018-01-304-5/+19
| | | | | | | | | | | | | Allows nir drivers to either use a single or dual locations for vs double inputs. i965 uses dual locations for both OpenGL and Vulkan drivers, for now gallium OpenGL drivers only use a single location. The following patch will also make use of this option when calling nir_shader_gather_info(). Reviewed-by: Karol Herbst <[email protected]>
* compiler: tidy up double_inputs_read usesTimothy Arceri2018-01-308-13/+24
| | | | | | | | | | | | | First we move double_inputs_read into a vs struct in the union, double_inputs_read is only used for vs inputs so this will save space and also allows us to add a new double_inputs field. We add the new field because c2acf97fcc9b changed the behaviour of double_inputs_read, and while it's no longer used to track actual reads in i965 we do still want to track this for gallium drivers. Reviewed-by: Marek Olšák <[email protected]>
* radv/gfx9: fix block compression texture views. (v2)Dave Airlie2018-01-301-4/+49
| | | | | | | | | | | | | | | | This ports a fix from amdvlk, to fix the sizing for mip levels when block compressed images are viewed using uncompressed views. My original fix didn't power the clamping, but it looks like the clamping is required to stop the sizing going too large. Fixes: dEQP-VK.image.texel_view_compatible.graphic.extended*bc* Doesn't crash DOW3 anymore. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Fixes: e38685cc62e 'Revert "radv: disable support for VEGA for now."' Signed-off-by: Dave Airlie <[email protected]>
* radv: Signal fence correctly after sparse binding.Bas Nieuwenhuizen2018-01-291-14/+32
| | | | | | | | | It did not signal syncobjs in the fence, and also signalled too early if there was work on the queue already, as we have to wait till that work is done. Fixes: d27aaae4d2 "radv: Add external fence support." Reviewed-by: Samuel Pitoiset <[email protected]>
* mesa/vbo: replace vbo_draw_method() with _mesa_set_drawing_arrays()Brian Paul2018-01-298-74/+34
| | | | | | | | | | | | | | | | | The arrays specified by ctx->Array._DrawArrays are used for all vertex drawing via vbo_context::draw_prims(). Different arrays are used for immediate mode, vertex arrays, display lists, etc. Changing from one to another requires updating derived/driver array state. Before, we indirectly specifid the arrays with the gl_draw_method values. Now we just directly specify the arrays instead. This is simpler and will allow a subsequent display list optimization. In the future, it might make sense to get rid of ctx->Array._DrawArrays entirely and just pass the arrays as another parameter to vbo_context::draw_prims(). Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: s/[0]/[VERT_ATTRIB_POS]/ in recalculate_input_bindings()Brian Paul2018-01-291-3/+3
| | | | Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: add new VBO_ATTRIBS_ masks to vbo_attrib.hBrian Paul2018-01-291-0/+15
| | | | | | These will be used in a later patch. Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: s/VBO_ATTRIB_INDEX/VBO_ATTRIB_COLOR_INDEX/Brian Paul2018-01-292-12/+13
| | | | | | | | To match the VERT_ATTRIB_COLOR_INDEX name. Give a name to the previously anonymous enum of VBO_ATTRIB_x values. Update the comment on the enum. Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: minor clean-ups in vbo_exec.hBrian Paul2018-01-291-5/+6
| | | | Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: s/_API_NOOP_H/VBO_NOOP_H/ in vbo_noop.hBrian Paul2018-01-291-3/+3
| | | | Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: whitespace/formatting fixes in vbo_exec.hBrian Paul2018-01-291-15/+18
| | | | Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: move, rename vp_mode enums, get_program_mode() functionBrian Paul2018-01-295-22/+27
| | | | | | | Instead of NONE/ARB use FF/SHADER. Move the enum declaration to vbo_private.h where it's used. Reviewed-by: Mathias Fröhlich <[email protected]>
* vbo: s/cl/array/ in vbo_context.cBrian Paul2018-01-291-15/+15
| | | | | | I think 'cl' used to mean client array. Reviewed-by: Mathias Fröhlich <[email protected]>
* nir: mark unused space in packed_tex_dataTapani Pälli2018-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | This change cleans following scary warnings in valgrind output when disk cache is being written: ==6532== Uninitialised byte(s) found during client check request ==6532== at 0x14423FAD: blob_write_bytes (blob.c:152) ==6532== by 0x144240FB: blob_write_uint32 (blob.c:194) ==6532== by 0x144001A5: write_tex (nir_serialize.c:613) and later (loads of): ==6532== Use of uninitialised value of size 8 ==6532== at 0x62FCD9E: crc32_z (in /usr/lib64/libz.so.1.2.11) ==6532== by 0x13F65014: util_hash_crc32 (crc32.c:127) ==6532== by 0x13F5DABA: cache_put (disk_cache.c:947) Signed-off-by: Tapani Pälli <[email protected]> Cc: [email protected] Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i965: fix disk_cache leak when destroying contextTapani Pälli2018-01-291-0/+3
| | | | | | | | | | | | | | | | ==2780== 1,024 bytes in 1 blocks are possibly lost in loss record 180 of 205 ==2780== at 0x4C31A1E: calloc (vg_replace_malloc.c:711) ==2780== by 0x13F6467E: util_queue_init (u_queue.c:309) ==2780== by 0x13F5C9F6: disk_cache_create (disk_cache.c:369) ==2780== by 0x13F05406: brw_disk_cache_init (brw_disk_cache.c:428) ==2780== by 0x13F01E78: brwCreateContext (brw_context.c:1068) Fixes: 1a61a8b9a7c ("i965: Initialize disk shader cache if MESA_GLSL_CACHE_DISABLE is false") Signed-off-by: Tapani Pälli <[email protected]> Cc: [email protected] Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: fix prog_data leak in brw_disk_cacheTapani Pälli2018-01-291-0/+2
| | | | | | | | | | | | | | | ==25481== 576 bytes in 1 blocks are definitely lost in loss record 179 of 208 ==25481== at 0x4C2FB6B: malloc (vg_replace_malloc.c:299) ==25481== by 0x1404E2CC: ralloc_size (ralloc.c:121) ==25481== by 0x14119F82: read_and_upload (brw_disk_cache.c:176) ==25481== by 0x1411A5C9: brw_disk_cache_upload_program (brw_disk_cache.c:271) ==25481== by 0x1412FCA4: brw_upload_wm_prog (brw_wm.c:597) Fixes: 516d50db319 ("i965: add initial implementation of on disk shader cache") Cc: [email protected] Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* ac: fix indentationTimothy Arceri2018-01-291-6/+6
| | | | Reviewed-by: Dave Airlie <[email protected]>
* ac: remove unused nir2llvmtype()Timothy Arceri2018-01-291-22/+0
| | | | | | The last use of this was removed in the previous patch. Reviewed-by: Dave Airlie <[email protected]>
* ac: fix gs load inputs typeTimothy Arceri2018-01-291-2/+3
| | | | | | | This fixes the scenario where the input is a struct. With this the Unreal engines Elemental demo now works on radeonsi. Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: call glsl_get_sampler_dim() only once where possibleKai Wasserbäch2018-01-291-8/+11
| | | | | | | | | | Changes since v1: * Rebased on top of e68150de263156a3f3d1b609b6506c5649967f61 and 82adf53308c137ce0dc5f2d5da4e7cc40c5b808c. Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* docs/features: add r600 ARB_query_buffer_object supportDave Airlie2018-01-291-7/+7
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: add ARB_query_buffer_object supportDave Airlie2018-01-2910-31/+817
| | | | | | | | | | | | | | This uses a different shader than radeonsi, as we can't address non-256 aligned ssbos, which the radeonsi code does. This passes some extra offsets into the shader. It also contains a set of u64 instruction implementation that may or may not be complete (at least the u64div is definitely not something that works outside this use-case). If r600 grows 64-bit integers, it will use the GLSL lowering for divmod. Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600/shader: refactor mul hi/lo instruction emissionDave Airlie2018-01-291-254/+116
| | | | | | | This just makes it a bit simpler for cayman vs eg Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600/eg: construct proper rat mask for image/buffers.Dave Airlie2018-01-293-8/+30
| | | | | | | | | | If the images/buffer bindings had a gap, this produced the wrong values, this should fix that to generate the correct rat mask for mixes of images/buffers/cbs. Reviewed-by: Roland Scheidegger <[email protected]> Cc: "18.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* meson: libdrm shouldn't appear in Requires.private: if it wasn't foundJon Turney2018-01-272-3/+10
| | | | | | | | | | | | | | | Otherwise, using pkg-config to retrieve flags will fail, e.g. $ pkg-config gl --cflags Package libdrm was not found in the pkg-config search path. Perhaps you should add the directory containing `libdrm.pc' to the PKG_CONFIG_PATH environment variable Package 'libdrm', required by 'gl', not found Fixes: 3218056e0eb3 ("meson: Build i965 and dri stack") Reviewed-by: Dylan Baker <[email protected]> Signed-off-by: Jon Turney <[email protected]>
* broadcom/vc5: Don't forget to get the BO offset when opening a dmabuf.Eric Anholt2018-01-271-0/+12
| | | | Fixes black display in DRI due to storing to 0x00000000.
* broadcom/vc5: Enable the driver on V3D 4.2.Eric Anholt2018-01-271-1/+6
| | | | | | The changes in 4.2 haven't impacted any of our CL or state struct entries that I can see, so I haven't enabled custom compile for doing 4.2 instead of 4.1.
* broadcom/vc5: Enable CLIF dumping of V3D 4.2.Eric Anholt2018-01-273-1/+10
|
* broadcom/vc5: Update the compiler for V3D 4.2.Eric Anholt2018-01-271-2/+6
|
* broadcom/vc5: Update QPU instruction pack/unpack for v4.2.Eric Anholt2018-01-274-5/+9
| | | | | After the 4.1 spec, 4.2 retroactively renamed patchid to barrierid because it's used for other barriers in compute.
* broadcom/vc5: Add XML for V3D 4.2.Eric Anholt2018-01-276-0/+1065
|
* broadcom/vc5: Fix a race between XML codegen build and CLIF build.Eric Anholt2018-01-271-1/+4
|
* Android: Attempt to fix broadcom build after vc5 changes.Eric Anholt2018-01-271-0/+5
|
* ac: rename and move si_const_array into common codeMarek Olšák2018-01-276-31/+25
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* ac: move address space definitions to common codeMarek Olšák2018-01-273-14/+7
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* ac: don't use byval LLVM qualifier in shadersMarek Olšák2018-01-277-24/+8
| | | | | | | shader-db doesn't show any regression and 32-bit pointers with byval are declared as VGPRs for some reason. Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium/radeon: set number of pb_cache buckets = number of heapsMarek Olšák2018-01-275-53/+25
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* pb_cache: let drivers choose the number of bucketsMarek Olšák2018-01-277-11/+28
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* pb_cache: call os_time_get outside of the loopMarek Olšák2018-01-271-6/+6
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium/radeon: simplify radeon_flags_from_heapMarek Olšák2018-01-271-14/+8
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* st/shader_cache: restore num_tgsi_tokens when loading from cacheTimothy Arceri2018-01-271-9/+16
| | | | | | | | | | | Without this we will fail to correctly serialise programs when using glGetProgramBinary() if the program was retrieved from the disk cache rather than freshly compiled. Fixes: c69b0dd6817b "st/glsl_to_tgsi: store num_tgsi_tokens in st_*_program" Reviewed-by: Gert Wollny <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104762
* winsys/amdgpu: fix assertion failure with UVD and VCE ringsMarek Olšák2018-01-261-2/+1
| | | | Cc: 18.0 <[email protected]>
* mesa: remove MESA_FUNCTIONBrian Paul2018-01-262-4/+2
| | | | | | Just use __func__ in the two macros where it was used. Reviewed-by: Neha Bhende <[email protected]>
* mesa: change gl_link_status enums to uppercaseBrian Paul2018-01-2618-35/+35
| | | | | | follow the convention of other enums. Reviewed-by: Neha Bhende <[email protected]>
* mesa: change gl_compile_status enums to uppercaseBrian Paul2018-01-267-17/+17
| | | | | | To follow the convention of other enums. Reviewed-by: Neha Bhende <[email protected]>
* mesa: minor comment reformatting, whitespace fixes in mtypes.hBrian Paul2018-01-261-43/+54
| | | | Trivial.