| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
| |
Some nine_state_* and nine_context_* functions
used for Reset() require all pending commands are
flushed.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
| |
Create both surfaces in one call.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
|
|
| |
When dirty region is empty, u_box_union_* incorrectly expands
the new region.
This fixes broken font rendering issue in WOLF RPG Editor v2.10 games.
Signed-off-by: Masanori Kakura <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Without this check, the kernel::bind() method would fail with a
std::out_of_range exception, letting an exception escape from the
library into the client, rather than returning the corresponding error
code CL_INVALID_PROGRAM_EXECUTABLE.
Signed-off-by: Pierre Moreau <[email protected]>
Reviewed-by: Francisco Jerez <[email protected]>
|
|
|
|
|
| |
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
|
|
|
|
|
|
| |
It's redundant with the source modifier.
Reviewed-by: Nicolai Hähnle <[email protected]>
|
|
|
|
|
|
|
| |
This is required to drop gallium SUB.
Signed-off-by: Axel Davy <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
|
|
|
|
|
|
|
| |
This is required to remove gallium SUB.
Signed-off-by: Axel Davy <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
|
|
|
|
|
|
|
| |
This is required for gallium SUB and ABS to be removed.
Signed-off-by: Axel Davy <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
|
|
|
|
|
|
|
|
| |
This fixes the mistake introduced in commit
b6737a8bcd03ea68952799144c0c6e6e6679bee9
Signed-off-by: Nayan Deshmukh <[email protected]>
Reviewed-by: Christian König <[email protected]>
|
|
|
|
|
|
|
| |
The context may be used by texture_get_handle.
Reviewed-by: Christian König <[email protected]>
Cc: 13.0 <[email protected]>
|
|
|
|
|
|
|
|
|
| |
The context may be used by texture_get_handle.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99158
Reviewed-by: Christian König <[email protected]>
Cc: 13.0 <[email protected]>
|
|
|
|
|
|
|
|
| |
handle the cases when vl_compositor_set_csc_matrix(),
vl_compositor_init_state() and vl_compositor_init() fail
Signed-off-by: Nayan Deshmukh <[email protected]>
Reviewed-by: Christian König <[email protected]>
|
|
|
|
|
|
|
|
| |
handle the cases when vl_compositor_set_csc_matrix(),
vl_compositor_init_state() and vl_compositor_init() fail
Signed-off-by: Nayan Deshmukh <[email protected]>
Reviewed-by: Christian König <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Presently errors from frontend are handled only if they occur in
clang::CompilerInvocation::CreateFromArgs(). This patch uses
clang::DiagnosticsEngine to detect errors such as invalid values for
Clang frontend arguments.
Fixes Piglit's cl/program/build/fail/invalid-version-declaration.cl
test.
v2: fix inconsistent code formatting
Signed-off-by: Vedran Miletić <[email protected]>
Reviewed-by: Francisco Jerez <[email protected]>
Tested-by: Aaron Watry <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Avoid synchronization by using the secondary context
for uploading the vertex data for Draw*Up.
v2: Rely on u_upload_mgr to use persistent coherent
buffers. Do not flush.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
Tests suggest MANAGED buffers are made dirty
at Lock time, not at Unlock time.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new buffer upload path enables to lock
faster than the normal path when using
DISCARD/NOOVERWRITE.
v2: Diverse cleanups and fixes.
v3: Fix allocation size for 'lone' buffers and
add more debug info.
v4: Rewrite of the path to handle when DISCARD/NOOVERWRITE
is not used anymore. The resource content is copied to the
new resource used.
v5: flush for safety after unmap (not sure it is really required
here, but safer to flush).
v6: Do not use the path if persistent coherent mapping is unavailable.
Fix buffer creation flags.
v7: Do not flush since it is not needed.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
Next patches will introduce an offset.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
If the volumes (and the texture container) are not referenced,
then they are no pending operations on them. We can lock directly.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
If the surfaces (and the texture container) are not referenced,
then they are no pending operations on them. We can lock directly.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
The new arguments enable to reference the objects while
the function hasn't run.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
Will enable to use the bind count as an information for
whether the surface/volume is used in the worker thread.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
Will enable to use the bind count as an information for
whether the surface/volume is used in the worker thread.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use nine_context_box_upload for uploads:
. systemmem volume to default volume
. managed volume internal content to its resource.
Check the uploads are executed before any action
that can alter the data, that is LockBox and
volume destruction.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
The last level was not released.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
The last level was not released.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use nine_context_box_upload for uploads:
. systemmem surface to default surface
. managed surface internal content to its resource.
Check the uploads are executed before any action
that can alter the data, that is LockRect,
NineSurface9_CopyDefaultToMem and surface destruction.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
This function will be used for surface and volume uploads
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
Generate mipmaps in the worker thread.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
To offload mipmap generation as well.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Do the upload in the other thread.
Usually managed buffers are used once per frame.
It is then very likely pending_upload is 0 at Lock
time.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
Will be used to upload buffers.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
This doesn't make sense to bind the container in that specific case.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
The behaviour is a bit less obscure now.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
| |
BackBuffers can survive swapchain dtor if
the user has a reference on them.
The swapchain itself has no reference on the buffer.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
We don't bind the container in AddRef.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
Remove some noop operations.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
Use the newly introduced counter to know when we don't
need synchronization.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
| |
Similar to the other macros, but introduces a counter,
which enables to know when the instructions has been
executed.
Signed-off-by: Patrick Rudolph <[email protected]>
|
|
|
|
|
|
| |
Enables to not wait for the worker thread for ColorFill.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
| |
When we lock the whole surface to overwrite it, we can use DISCARD.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
For render targets, NineSurface9_GetSurface is not
expected to fail.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
Use the acquire/release semantic when we don't need
to wait for any pending command.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the secondary pipe for DISCARD/NOOVERWRITE, which
avoids stalling to get the pipe from the worker thread.
v2: flush at unmap. This is required for example if
the driver does hidden draw calls or copies. In the case
of unsynchronized it is probably not required, but
it is more safe.
Signed-off-by: Axel Davy <[email protected]>
|
|
|
|
|
|
|
| |
The secondary pipe will be used for operations
that don't need synchronization.
Signed-off-by: Axel Davy <[email protected]>
|