Commit 4de8ba15 authored by Dave Airlie's avatar Dave Airlie Committed by Dave Airlie
Browse files

intel/decode: handle gen4/5 WM state fragment shaders


Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
Part-of: <mesa/mesa!11146>
parent 11d3ceba
...@@ -611,10 +611,10 @@ decode_single_ksp(struct intel_batch_decode_ctx *ctx, const uint32_t *p) ...@@ -611,10 +611,10 @@ decode_single_ksp(struct intel_batch_decode_ctx *ctx, const uint32_t *p)
} }
static void static void
decode_ps_kernels(struct intel_batch_decode_ctx *ctx, const uint32_t *p) decode_ps_kern(struct intel_batch_decode_ctx *ctx,
struct intel_group *inst, const uint32_t *p)
{ {
struct intel_group *inst = intel_ctx_find_instruction(ctx, p); bool single_ksp = ctx->devinfo.ver == 4;
uint64_t ksp[3] = {0, 0, 0}; uint64_t ksp[3] = {0, 0, 0};
bool enabled[3] = {false, false, false}; bool enabled[3] = {false, false, false};
...@@ -634,6 +634,9 @@ decode_ps_kernels(struct intel_batch_decode_ctx *ctx, const uint32_t *p) ...@@ -634,6 +634,9 @@ decode_ps_kernels(struct intel_batch_decode_ctx *ctx, const uint32_t *p)
} }
} }
if (single_ksp)
ksp[1] = ksp[2] = ksp[0];
/* Reorder KSPs to be [8, 16, 32] instead of the hardware order. */ /* Reorder KSPs to be [8, 16, 32] instead of the hardware order. */
if (enabled[0] + enabled[1] + enabled[2] == 1) { if (enabled[0] + enabled[1] + enabled[2] == 1) {
if (enabled[1]) { if (enabled[1]) {
...@@ -660,6 +663,14 @@ decode_ps_kernels(struct intel_batch_decode_ctx *ctx, const uint32_t *p) ...@@ -660,6 +663,14 @@ decode_ps_kernels(struct intel_batch_decode_ctx *ctx, const uint32_t *p)
fprintf(ctx->fp, "\n"); fprintf(ctx->fp, "\n");
} }
static void
decode_ps_kernels(struct intel_batch_decode_ctx *ctx,
const uint32_t *p)
{
struct intel_group *inst = intel_ctx_find_instruction(ctx, p);
decode_ps_kern(ctx, inst, p);
}
static void static void
decode_3dstate_constant_all(struct intel_batch_decode_ctx *ctx, const uint32_t *p) decode_3dstate_constant_all(struct intel_batch_decode_ctx *ctx, const uint32_t *p)
{ {
...@@ -1092,6 +1103,8 @@ decode_wm_state(struct intel_batch_decode_ctx *ctx, uint32_t offset) ...@@ -1092,6 +1103,8 @@ decode_wm_state(struct intel_batch_decode_ctx *ctx, uint32_t offset)
} }
ctx_print_group(ctx, strct, offset, bind_bo.map); ctx_print_group(ctx, strct, offset, bind_bo.map);
decode_ps_kern(ctx, strct, bind_bo.map);
} }
static void static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment