mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
intel/decoder: add options to decode surfaces/samplers
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24632>
This commit is contained in:
parent
cf5ee0a0f7
commit
eef54f3175
6 changed files with 22 additions and 21 deletions
|
|
@ -249,10 +249,8 @@ crocus_init_batch(struct crocus_context *ice,
|
||||||
if (INTEL_DEBUG(DEBUG_BATCH)) {
|
if (INTEL_DEBUG(DEBUG_BATCH)) {
|
||||||
|
|
||||||
batch->state_sizes = _mesa_hash_table_u64_create(NULL);
|
batch->state_sizes = _mesa_hash_table_u64_create(NULL);
|
||||||
const unsigned decode_flags =
|
const unsigned decode_flags = INTEL_BATCH_DECODE_DEFAULT_FLAGS |
|
||||||
INTEL_BATCH_DECODE_FULL |
|
(INTEL_DEBUG(DEBUG_COLOR) ? INTEL_BATCH_DECODE_IN_COLOR : 0);
|
||||||
(INTEL_DEBUG(DEBUG_COLOR) ? INTEL_BATCH_DECODE_IN_COLOR : 0) |
|
|
||||||
INTEL_BATCH_DECODE_OFFSETS | INTEL_BATCH_DECODE_FLOATS;
|
|
||||||
|
|
||||||
intel_batch_decode_ctx_init(&batch->decoder, &screen->compiler->isa,
|
intel_batch_decode_ctx_init(&batch->decoder, &screen->compiler->isa,
|
||||||
&screen->devinfo, stderr,
|
&screen->devinfo, stderr,
|
||||||
|
|
|
||||||
|
|
@ -229,11 +229,8 @@ iris_init_batch(struct iris_context *ice,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (INTEL_DEBUG(DEBUG_ANY)) {
|
if (INTEL_DEBUG(DEBUG_ANY)) {
|
||||||
const unsigned decode_flags =
|
const unsigned decode_flags = INTEL_BATCH_DECODE_DEFAULT_FLAGS |
|
||||||
INTEL_BATCH_DECODE_FULL |
|
(INTEL_DEBUG(DEBUG_COLOR) ? INTEL_BATCH_DECODE_IN_COLOR : 0);
|
||||||
(INTEL_DEBUG(DEBUG_COLOR) ? INTEL_BATCH_DECODE_IN_COLOR : 0) |
|
|
||||||
INTEL_BATCH_DECODE_OFFSETS |
|
|
||||||
INTEL_BATCH_DECODE_FLOATS;
|
|
||||||
|
|
||||||
intel_batch_decode_ctx_init(&batch->decoder, &screen->compiler->isa,
|
intel_batch_decode_ctx_init(&batch->decoder, &screen->compiler->isa,
|
||||||
screen->devinfo,
|
screen->devinfo,
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ static const struct debug_control debug_control[] = {
|
||||||
{ "full", INTEL_BATCH_DECODE_FULL },
|
{ "full", INTEL_BATCH_DECODE_FULL },
|
||||||
{ "offsets", INTEL_BATCH_DECODE_OFFSETS },
|
{ "offsets", INTEL_BATCH_DECODE_OFFSETS },
|
||||||
{ "floats", INTEL_BATCH_DECODE_FLOATS },
|
{ "floats", INTEL_BATCH_DECODE_FLOATS },
|
||||||
|
{ "surfaces", INTEL_BATCH_DECODE_SURFACES },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -356,7 +357,8 @@ dump_binding_table(struct intel_batch_decode_ctx *ctx,
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(ctx->fp, "pointer %u: 0x%08x\n", i, pointers[i]);
|
fprintf(ctx->fp, "pointer %u: 0x%08x\n", i, pointers[i]);
|
||||||
ctx_print_group(ctx, strct, addr, bo.map + (addr - bo.addr));
|
if (ctx->flags & INTEL_BATCH_DECODE_SURFACES)
|
||||||
|
ctx_print_group(ctx, strct, addr, bo.map + (addr - bo.addr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -391,7 +393,8 @@ dump_samplers(struct intel_batch_decode_ctx *ctx, uint32_t offset, int count)
|
||||||
|
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
fprintf(ctx->fp, "sampler state %d\n", i);
|
fprintf(ctx->fp, "sampler state %d\n", i);
|
||||||
ctx_print_group(ctx, strct, state_addr, state_map);
|
if (ctx->flags & INTEL_BATCH_DECODE_SAMPLERS)
|
||||||
|
ctx_print_group(ctx, strct, state_addr, state_map);
|
||||||
state_addr += sampler_state_size;
|
state_addr += sampler_state_size;
|
||||||
state_map += sampler_state_size;
|
state_map += sampler_state_size;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -216,8 +216,19 @@ enum intel_batch_decode_flags {
|
||||||
INTEL_BATCH_DECODE_OFFSETS = (1 << 2),
|
INTEL_BATCH_DECODE_OFFSETS = (1 << 2),
|
||||||
/** Guess when a value is a float and print it as such */
|
/** Guess when a value is a float and print it as such */
|
||||||
INTEL_BATCH_DECODE_FLOATS = (1 << 3),
|
INTEL_BATCH_DECODE_FLOATS = (1 << 3),
|
||||||
|
/** Print surface states */
|
||||||
|
INTEL_BATCH_DECODE_SURFACES = (1 << 4),
|
||||||
|
/** Print sampler states */
|
||||||
|
INTEL_BATCH_DECODE_SAMPLERS = (1 << 5),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define INTEL_BATCH_DECODE_DEFAULT_FLAGS \
|
||||||
|
(INTEL_BATCH_DECODE_FULL | \
|
||||||
|
INTEL_BATCH_DECODE_OFFSETS | \
|
||||||
|
INTEL_BATCH_DECODE_FLOATS | \
|
||||||
|
INTEL_BATCH_DECODE_SURFACES | \
|
||||||
|
INTEL_BATCH_DECODE_SAMPLERS)
|
||||||
|
|
||||||
struct intel_batch_decode_bo {
|
struct intel_batch_decode_bo {
|
||||||
uint64_t addr;
|
uint64_t addr;
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
|
|
|
||||||
|
|
@ -3043,11 +3043,7 @@ VkResult anv_CreateDevice(
|
||||||
for (unsigned i = 0; i < physical_device->queue.family_count; i++) {
|
for (unsigned i = 0; i < physical_device->queue.family_count; i++) {
|
||||||
struct intel_batch_decode_ctx *decoder = &device->decoder[i];
|
struct intel_batch_decode_ctx *decoder = &device->decoder[i];
|
||||||
|
|
||||||
const unsigned decode_flags =
|
const unsigned decode_flags = INTEL_BATCH_DECODE_DEFAULT_FLAGS;
|
||||||
INTEL_BATCH_DECODE_FULL |
|
|
||||||
(INTEL_DEBUG(DEBUG_COLOR) ? INTEL_BATCH_DECODE_IN_COLOR : 0) |
|
|
||||||
INTEL_BATCH_DECODE_OFFSETS |
|
|
||||||
INTEL_BATCH_DECODE_FLOATS;
|
|
||||||
|
|
||||||
intel_batch_decode_ctx_init(decoder,
|
intel_batch_decode_ctx_init(decoder,
|
||||||
&physical_device->compiler->isa,
|
&physical_device->compiler->isa,
|
||||||
|
|
|
||||||
|
|
@ -2729,11 +2729,7 @@ VkResult anv_CreateDevice(
|
||||||
goto fail_alloc;
|
goto fail_alloc;
|
||||||
|
|
||||||
if (INTEL_DEBUG(DEBUG_BATCH)) {
|
if (INTEL_DEBUG(DEBUG_BATCH)) {
|
||||||
const unsigned decode_flags =
|
const unsigned decode_flags = INTEL_BATCH_DECODE_DEFAULT_FLAGS;
|
||||||
INTEL_BATCH_DECODE_FULL |
|
|
||||||
(INTEL_DEBUG(DEBUG_COLOR) ? INTEL_BATCH_DECODE_IN_COLOR : 0) |
|
|
||||||
INTEL_BATCH_DECODE_OFFSETS |
|
|
||||||
INTEL_BATCH_DECODE_FLOATS;
|
|
||||||
|
|
||||||
intel_batch_decode_ctx_init(&device->decoder_ctx,
|
intel_batch_decode_ctx_init(&device->decoder_ctx,
|
||||||
&physical_device->compiler->isa,
|
&physical_device->compiler->isa,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue