aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine
Commit message (Collapse)AuthorAgeFilesLines
* autotools: include meson build files in tarballDylan Baker2018-01-191-1/+1
| | | | | | | | | | | | This adds the meson.build, meson_options.txt, and a few scripts that are used exclusively by the meson build. v2: - Remove accidentally included changes needed to test make dist with LLVM > 3.9 Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* nine: assume that user constant buffers are always supportedMarek Olšák2018-01-174-156/+4
| | | | Tested-by: Dieter Nützel <[email protected]>
* gallium: remove PIPE_CAP_TWO_SIDED_STENCILMarek Olšák2018-01-171-1/+1
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* meson: add dep_thread to every lib that includes threads.hEric Engestrom2017-12-071-0/+1
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104141 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: build gallium nine state_trackerDylan Baker2017-12-041-0/+69
| | | | | | | | | | | v2: - set d3d_drivers_path instead of dri_drivers_path - Fix nine guard to check for all relavent gallium drivers - Link with libswdri and libswkmsdri when necessary - Fix pkg-config generation - Add missing comma Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium/hud: update the HUD interface for multiple contextsMarek Olšák2017-11-252-2/+2
| | | | | | | This is the boring subset of the following commit. All new parameters are optional. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: use cso_get_pipe_contextMarek Olšák2017-11-251-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: split hud_draw into 3 separate functionsMarek Olšák2017-11-251-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* nine: always generate two-dimensional constant file accessesNicolai Hähnle2017-09-042-7/+5
| | | | | | Acked-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* gallium: remove TGSI opcode SCSMarek Olšák2017-08-221-4/+8
| | | | | | | use COS+SIN instead. Reviewed-by: Roland Scheidegger <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* gallium: remove TGSI opcode BREAKCMarek Olšák2017-08-221-1/+1
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: remove TGSI opcode XPDMarek Olšák2017-08-221-1/+24
| | | | | | use MUL+MAD+MOV instead. Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: populate preciseKarol Herbst2017-07-211-3/+3
| | | | | | | | | Only implemented for glsl->tgsi. Other converters just set precise to 0. v2: remove precise paramter from ureg_tex_insn and ureg_memory_insn Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* util: move pipe_thread_is_self from gallium to src/utilMarek Olšák2017-06-261-1/+1
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* st/nine: Fix a regression and syntax cleanupAxel Davy2017-05-244-19/+16
| | | | | | | | | | | | | A few cleanups and in particular initializing properly the new pipe_draw_info fields. This should fix the regression caused by 330d0607ed60fd3edca192e54b4246310f06652f Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101088 Signed-off-by: Axel Davy <[email protected]> Tested-by: Edmondo Tommasina <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* gallium: remove pipe_index_buffer and set_index_bufferMarek Olšák2017-05-105-58/+56
| | | | | | | | | | | | | | pipe_draw_info::indexed is replaced with index_size. index_size == 0 means non-indexed. Instead of pipe_index_buffer::offset, pipe_draw_info::start is used. For indexed indirect draws, pipe_draw_info::start is added to the indirect start. This is the only case when "start" affects indirect draws. pipe_draw_info::index is a union. Use either index::resource or index::user depending on the value of pipe_draw_info::has_user_indices. v2: fixes for nine, svga
* gallium: separate indirect stuff from pipe_draw_info - 80 -> 56 bytesMarek Olšák2017-05-102-2/+0
| | | | For faster initialization of non-indirect draws.
* gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytesMarek Olšák2017-05-103-32/+48
|
* st/nine: Fix support for ps 1.4 dw and dz modifiersAxel Davy2017-04-131-2/+2
| | | | | | | | | | | RCP was used incorrectly to support NINED3DSPSM_DW and NINED3DSPSM_DZ. src.x was used as input instead of src.w or src.z. Fixes: https://github.com/iXit/Mesa-3D/issues/271 Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* gallium: remove support for predicates from TGSI (v2)Marek Olšák2017-04-011-16/+2
| | | | | | | | | | | Neved used. v2: gallivm: rename "pred" -> "exec_mask" etnaviv: remove the cap gallium: fix tgsi_instruction::Padding Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* st/nine: Use atomics for available_texture_memAxel Davy2017-03-261-2/+2
| | | | | | | | | Resource dtor can be executed in the worker thread. Use atomic to avoid threading safety issues. CC: "17.0" <[email protected]> Signed-off-by: Axel Davy <[email protected]> Tested-by: James Harvey <[email protected]>
* st/nine: Resolve deadlock in surface/volume dtors when using csmtAxel Davy2017-03-263-5/+17
| | | | | | | | | | | | | | | | | | | | Surfaces and Volumes can be freed in the worker thread. Without this patch, pending_uploads_counter could be non-zero in the Surfaces or Volumes dtor, leading to deadlock. Instead decrease properly the counter before releasing the item. Also avoid another potential deadlock if the item is not properly unlocked: Do not call UnlockRect which will cause deadlock, but free directly using the deadlock safe nine_context_get_pipe_multithread. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99246 CC: "17.0" <[email protected]> Signed-off-by: Axel Davy <[email protected]> Tested-by: James Harvey <[email protected]>
* st/nine: Fix user vertex data uploader with csmtAxel Davy2017-03-262-8/+8
| | | | | | | | | | Fix regression caused by abb1c645c476b5dd289ce3efae0594f8796f9cf8 The patch made csmt use context.pipe instead of secondary_pipe, leading to thread safety issues. Signed-off-by: Axel Davy <[email protected]>
* gallium/util: replace pipe_thread_setname() with u_thread_setname()Timothy Arceri2017-03-121-2/+2
| | | | | | | They do the same thing we just moved the function to be accessible to all of Mesa. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_thread_create() with u_thread_create()Timothy Arceri2017-03-121-1/+1
| | | | | | | They do the same thing we just moved the function to be accessible to all of Mesa. Reviewed-by: Marek Olšák <[email protected]>
* st/nine: pass NULL to ureg_get_tokens()Timothy Arceri2017-03-092-4/+2
| | | | | | | The number of tokens in never used and the pointer is NULL checked so just pass NULL. Reviewed-by: Axel Davy <[email protected]>
* gallium/util: replace pipe_thread_wait() with thrd_join()Timothy Arceri2017-03-071-1/+1
| | | | | | | | | Replace done using: find ./src -type f -exec sed -i -- \ 's:pipe_thread_wait(\([^)]*\)):thrd_join(\1, NULL):g' {} \; Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: remove PIPE_THREAD_ROUTINE()Timothy Arceri2017-03-071-1/+2
| | | | | | | | | | | | | This was made unnecessary with fd33a6bcd7f12. This was mostly done with: find ./src -type f -exec sed -i -- \ 's:PIPE_THREAD_ROUTINE(\([^,]*\), \([^)]*\)):int\n\1(void \*\2):g' {} \; With some small manual tidy ups. Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_condvar with cnd_tTimothy Arceri2017-03-072-3/+3
| | | | | | pipe_condvar was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_thread with thrd_tTimothy Arceri2017-03-071-2/+2
| | | | | | | | pipe_thread was made unnecessary with fd33a6bcd7f12. V2: fix compile error in u_queue.c Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_unlock() with mtx_unlock()Timothy Arceri2017-03-073-232/+232
| | | | | | | | | | pipe_mutex_unlock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_unlock(\([^)]*\)):mtx_unlock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_lock() with mtx_lock()Timothy Arceri2017-03-073-232/+232
| | | | | | | | | | replace pipe_mutex_lock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_lock(\([^)]*\)):mtx_lock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_destroy() with mtx_destroy()Timothy Arceri2017-03-072-3/+3
| | | | | | | | | | pipe_mutex_destroy() was made unnecessary with fd33a6bcd7f12. Replace was done with: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_destroy(\([^)]*\)):mtx_destroy(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_init() with mtx_init()Timothy Arceri2017-03-072-5/+5
| | | | | | | | | | pipe_mutex_init() was made unnecessary with fd33a6bcd7f12. Replace was done using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_init(\([^)]*\)):(void) mtx_init(\&\1, mtx_plain):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: remove pipe_static_mutex()Timothy Arceri2017-03-071-1/+1
| | | | | | This was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex with mtx_tTimothy Arceri2017-03-072-5/+5
| | | | | | pipe_mutex was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_condvar_signal() with cnd_signal()Timothy Arceri2017-03-072-4/+4
| | | | | | | pipe_condvar_signal() was made unnecessary with fd33a6bcd7f12. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_condvar_wait() with cnd_wait()Timothy Arceri2017-03-072-3/+3
| | | | | | | pipe_condvar_wait() was made unnecessary with fd33a6bcd7f12. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_condvar_init() with cnd_init()Timothy Arceri2017-03-072-3/+3
| | | | | | | pipe_condvar_init() was made unnecessary with fd33a6bcd7f12. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[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
* gallium: let state trackers tell u_vbuf whether user VBOs are possibleMarek Olšák2017-02-141-2/+2
| | | | | | This can affect whether u_vbuf will be enabled or not. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/nine: update configure options in the READMEEmil Velikov2017-02-101-2/+1
| | | | | Cc: Axel Davy <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* st/nine: set the MUL_ZERO_WINS flag when supportedIlia Mirkin2017-01-231-0/+3
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Protect dtors with mutexAxel Davy2017-01-124-19/+64
| | | | | | | | | | | | | | | | | | | | | When the flag D3DCREATE_MULTITHREAD is set, a global mutex is used to protect nine calls. However for performance reasons, AddRef and Release didn't hold the mutex, and instead used atomics. Unfortunately at item release, the item can be destroyed, and that destruction path should be protected by a mutex (at least for some objects). Without this patch, it is possible an app thread is in a dtor while another thread is making gallium nine calls. It is possible that two threads are using the same gallium pipe, which is forbiden. The problem has been made worse with csmt, because it can cause hang, since nine_csmt_process is not threadsafe. Fixes Hitman hang, and possibly others. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Flush the queue at device dtorAxel Davy2017-01-121-1/+6
| | | | | | | | Flush the queue to get refcounts right, and properly release the items, instead of throwing away all pending commands. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Process pending commands on ResetAxel Davy2017-01-123-0/+5
| | | | | | | | Some nine_state_* and nine_context_* functions used for Reset() require all pending commands are flushed. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Flush pending commands if needed for surface9 changesAxel Davy2017-01-122-13/+32
| | | | | | | nine_context uses NineSurface9 fields, thus we need to flush pending commands using the surface before changing the fields. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Rework CreatePipeSurfaceAxel Davy2017-01-122-22/+30
| | | | | | Create both surfaces in one call. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Remove duplicated checksAxel Davy2017-01-122-10/+7
| | | | | | | | There is no need to check on csmt_active before calling nine_csmt_process, because the function checks already. Signed-off-by: Axel Davy <[email protected]>