From 56cd91bc7cececd04aeb9fe2d93ebc55b226983e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=9Alusarz?= Date: Fri, 19 Mar 2021 09:57:33 +0100 Subject: [PATCH] intel/batch_decoder: fix decoding of sampler states MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's only 1 sampler state behind 3DSTATE_SAMPLER_STATE_POINTERS[_VS|_HS|_DS|_GS|_PS] and 3DSTATE_SAMPLER_STATE_POINTERS.[PointertoVSSamplerState|PointertoPSSamplerState|PointertoGSSamplerState]. Signed-off-by: Marcin Ĺšlusarz Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/common/intel_batch_decoder.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/intel/common/intel_batch_decoder.c b/src/intel/common/intel_batch_decoder.c index ca87320118c..8c4387b8df0 100644 --- a/src/intel/common/intel_batch_decoder.c +++ b/src/intel/common/intel_batch_decoder.c @@ -332,10 +332,7 @@ dump_samplers(struct intel_batch_decode_ctx *ctx, uint32_t offset, int count) struct intel_group *strct = intel_spec_find_struct(ctx->spec, "SAMPLER_STATE"); uint64_t state_addr = ctx->dynamic_base + offset; - if (count < 0) { - count = update_count(ctx, state_addr, ctx->dynamic_base, - strct->dw_length, 4); - } + assert(count > 0); struct intel_batch_decode_bo bo = ctx_get_bo(ctx, true, state_addr); const void *state_map = bo.map; @@ -775,16 +772,16 @@ static void decode_3dstate_sampler_state_pointers(struct intel_batch_decode_ctx *ctx, const uint32_t *p) { - dump_samplers(ctx, p[1], -1); + dump_samplers(ctx, p[1], 1); } static void decode_3dstate_sampler_state_pointers_gen6(struct intel_batch_decode_ctx *ctx, const uint32_t *p) { - dump_samplers(ctx, p[1], -1); - dump_samplers(ctx, p[2], -1); - dump_samplers(ctx, p[3], -1); + dump_samplers(ctx, p[1], 1); + dump_samplers(ctx, p[2], 1); + dump_samplers(ctx, p[3], 1); } static bool