diff options
author | Timothy Arceri <[email protected]> | 2018-01-14 20:49:40 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-01-31 09:14:07 +1100 |
commit | 3ff012f142f42faed6d281cf4a17f72ec977c8cb (patch) | |
tree | 9438308e637ccd1ef7296a0b9a3d25a8d8ed9d49 /src | |
parent | 3a47b138e3d94494730b3131f70d1e67cfb1826c (diff) |
radeonsi/nir: adjust load_sample_position() to be shared between backends
With this interface change it can be shared between the tgsi and
nir backends.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index b18b4f63b86..71a8733780c 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1879,8 +1879,9 @@ static LLVMValueRef buffer_load_const(struct si_shader_context *ctx, 0, 0, 0, true, true); } -static LLVMValueRef load_sample_position(struct si_shader_context *ctx, LLVMValueRef sample_id) +static LLVMValueRef load_sample_position(struct ac_shader_abi *abi, LLVMValueRef sample_id) { + struct si_shader_context *ctx = si_shader_context_from_abi(abi); struct lp_build_context *uint_bld = &ctx->bld_base.uint_bld; LLVMValueRef desc = LLVMGetParam(ctx->main_fn, ctx->param_rw_buffers); LLVMValueRef buf_index = LLVMConstInt(ctx->i32, SI_PS_CONST_SAMPLE_POSITIONS, 0); @@ -4046,7 +4047,7 @@ static void interp_fetch_args( sample_position = lp_build_gather_values(&ctx->gallivm, center, 4); } else { - sample_position = load_sample_position(ctx, sample_id); + sample_position = load_sample_position(&ctx->abi, sample_id); } emit_data->args[0] = LLVMBuildExtractElement(ctx->ac.builder, |