mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 10:26:12 +00:00
lib: execbuffer2 support
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
2374af20fe
commit
8ab88c9af0
@ -122,7 +122,8 @@ intel_batchbuffer_flush(struct intel_batchbuffer *batch)
|
|||||||
void
|
void
|
||||||
intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
|
intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
|
||||||
drm_intel_bo *buffer, uint32_t delta,
|
drm_intel_bo *buffer, uint32_t delta,
|
||||||
uint32_t read_domains, uint32_t write_domain)
|
uint32_t read_domains, uint32_t write_domain,
|
||||||
|
int fenced)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -132,9 +133,14 @@ intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
|
|||||||
(int)(batch->ptr - batch->buffer),
|
(int)(batch->ptr - batch->buffer),
|
||||||
BATCH_SZ);
|
BATCH_SZ);
|
||||||
|
|
||||||
ret = drm_intel_bo_emit_reloc(batch->bo, batch->ptr - batch->buffer,
|
if (fenced)
|
||||||
buffer, delta,
|
ret = drm_intel_bo_emit_reloc_fence(batch->bo, batch->ptr - batch->buffer,
|
||||||
read_domains, write_domain);
|
buffer, delta,
|
||||||
|
read_domains, write_domain);
|
||||||
|
else
|
||||||
|
ret = drm_intel_bo_emit_reloc(batch->bo, batch->ptr - batch->buffer,
|
||||||
|
buffer, delta,
|
||||||
|
read_domains, write_domain);
|
||||||
intel_batchbuffer_emit_dword(batch, buffer->offset + delta);
|
intel_batchbuffer_emit_dword(batch, buffer->offset + delta);
|
||||||
assert(ret == 0);
|
assert(ret == 0);
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,8 @@ void intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
|
|||||||
drm_intel_bo *buffer,
|
drm_intel_bo *buffer,
|
||||||
uint32_t delta,
|
uint32_t delta,
|
||||||
uint32_t read_domains,
|
uint32_t read_domains,
|
||||||
uint32_t write_domain);
|
uint32_t write_domain,
|
||||||
|
int fenced);
|
||||||
|
|
||||||
/* Inline functions - might actually be better off with these
|
/* Inline functions - might actually be better off with these
|
||||||
* non-inlined. Certainly better off switching all command packets to
|
* non-inlined. Certainly better off switching all command packets to
|
||||||
@ -77,10 +78,16 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
|
|||||||
|
|
||||||
#define OUT_BATCH(d) intel_batchbuffer_emit_dword(batch, d)
|
#define OUT_BATCH(d) intel_batchbuffer_emit_dword(batch, d)
|
||||||
|
|
||||||
|
#define OUT_RELOC_FENCED(buf, read_domains, write_domain, delta) do { \
|
||||||
|
assert((delta) >= 0); \
|
||||||
|
intel_batchbuffer_emit_reloc(batch, buf, delta, \
|
||||||
|
read_domains, write_domain, 1); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#define OUT_RELOC(buf, read_domains, write_domain, delta) do { \
|
#define OUT_RELOC(buf, read_domains, write_domain, delta) do { \
|
||||||
assert((delta) >= 0); \
|
assert((delta) >= 0); \
|
||||||
intel_batchbuffer_emit_reloc(batch, buf, delta, \
|
intel_batchbuffer_emit_reloc(batch, buf, delta, \
|
||||||
read_domains, write_domain); \
|
read_domains, write_domain, 0); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define ADVANCE_BATCH() do { \
|
#define ADVANCE_BATCH() do { \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user