mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-07 05:30:25 +01:00
i965: fix in fences backend for ext_external_objects edge case
This ports adc575dbf6 to i965
Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eleni Maria Stea <elene.mst@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5594>
This commit is contained in:
parent
3a9786d4ee
commit
58890ea199
3 changed files with 7 additions and 1 deletions
|
|
@ -155,6 +155,7 @@ brw_batch_init(struct brw_context *brw)
|
|||
malloc(batch->exec_array_size * sizeof(batch->exec_bos[0]));
|
||||
batch->validation_list =
|
||||
malloc(batch->exec_array_size * sizeof(batch->validation_list[0]));
|
||||
batch->contains_fence_signal = false;
|
||||
|
||||
if (INTEL_DEBUG & DEBUG_BATCH) {
|
||||
batch->state_batch_sizes =
|
||||
|
|
@ -292,6 +293,9 @@ brw_batch_reset(struct brw_context *brw)
|
|||
struct brw_bo *identifier_bo = brw->workaround_bo;
|
||||
if (identifier_bo)
|
||||
add_exec_bo(batch, identifier_bo);
|
||||
|
||||
if (batch->contains_fence_signal)
|
||||
batch->contains_fence_signal = false;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -878,7 +882,7 @@ _brw_batch_flush_fence(struct brw_context *brw,
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (USED_BATCH(brw->batch) == 0)
|
||||
if (USED_BATCH(brw->batch) == 0 && !brw->batch.contains_fence_signal)
|
||||
return 0;
|
||||
|
||||
/* Check that we didn't just wrap our batchbuffer at a bad time. */
|
||||
|
|
|
|||
|
|
@ -504,6 +504,7 @@ struct brw_batch {
|
|||
bool needs_sol_reset;
|
||||
bool state_base_address_emitted;
|
||||
bool no_wrap;
|
||||
bool contains_fence_signal;
|
||||
|
||||
struct brw_reloc_list batch_relocs;
|
||||
struct brw_reloc_list state_relocs;
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ intel_semaphoreobj_signal(struct gl_context *ctx,
|
|||
util_dynarray_grow(&brw->batch.exec_fences, struct drm_i915_gem_exec_fence *, 1);
|
||||
fence->flags = I915_EXEC_FENCE_SIGNAL;
|
||||
fence->handle = iSemObj->syncobj->handle;
|
||||
brw->batch.contains_fence_signal = true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue