diff options
author | Rob Clark <[email protected]> | 2018-06-01 14:07:15 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-07-18 10:10:44 -0400 |
commit | 8dfc9e22c12ff840510d876b09d7f7163256bb17 (patch) | |
tree | 2f4e00e1bc0029bbb4da8c7095fbcf099914812a /src/gallium/drivers/freedreno | |
parent | 09f240eb5ff6c24471bd55770771b7755ad07bc0 (diff) |
nir: add lowering for gl_HelperInvocation
v2: reword comment about lower_helper_invocations to be more clear
that it might not work on all hardware
v3: add special variant of load_sample_id which does not imply per-
sample shading
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_nir.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c index 892fb061442..9f74fa2530a 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c @@ -2445,6 +2445,7 @@ emit_intrinsic(struct ir3_context *ctx, nir_intrinsic_instr *intr) dst[0] = ctx->instance_id; break; case nir_intrinsic_load_sample_id: + case nir_intrinsic_load_sample_id_no_per_sample: if (!ctx->samp_id) { ctx->samp_id = create_input(b, 0); ctx->samp_id->regs[0]->flags |= IR3_REG_HALF; diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_nir.c index 8f46aef14e4..db1d74fdee7 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_nir.c @@ -52,6 +52,7 @@ static const nir_shader_compiler_options options = { .lower_extract_byte = true, .lower_extract_word = true, .lower_all_io_to_temps = true, + .lower_helper_invocation = true, }; struct nir_shader * |