diff options
author | Marek Olšák <[email protected]> | 2017-04-22 21:12:08 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-04-28 21:47:35 +0200 |
commit | 0490074cab0393b1128d1f316948c7bdd6d45e57 (patch) | |
tree | a8f31e20ec00aa4dcfed4433214ba8d7dc750952 /src/gallium/drivers/radeonsi/si_shader.c | |
parent | 4e5006202810ae3450a28372a2bf79663e1b6066 (diff) |
radeonsi: fix tess offchip offset for per-patch attributes
We need 4 more bits there. I don't know what is fixed by this.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index f917cf50522..a330b3043c5 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -715,8 +715,8 @@ static LLVMValueRef get_tcs_tes_buffer_address(struct si_shader_context *ctx, LLVMValueRef base_addr, vertices_per_patch, num_patches, total_vertices; LLVMValueRef param_stride, constant16; - vertices_per_patch = unpack_param(ctx, ctx->param_tcs_offchip_layout, 9, 6); - num_patches = unpack_param(ctx, ctx->param_tcs_offchip_layout, 0, 9); + vertices_per_patch = unpack_param(ctx, ctx->param_tcs_offchip_layout, 6, 6); + num_patches = unpack_param(ctx, ctx->param_tcs_offchip_layout, 0, 6); total_vertices = LLVMBuildMul(gallivm->builder, vertices_per_patch, num_patches, ""); @@ -742,7 +742,7 @@ static LLVMValueRef get_tcs_tes_buffer_address(struct si_shader_context *ctx, if (!vertex_index) { LLVMValueRef patch_data_offset = - unpack_param(ctx, ctx->param_tcs_offchip_layout, 16, 16); + unpack_param(ctx, ctx->param_tcs_offchip_layout, 12, 20); base_addr = LLVMBuildAdd(gallivm->builder, base_addr, patch_data_offset, ""); @@ -1546,7 +1546,7 @@ static void declare_system_value(struct si_shader_context *ctx, if (ctx->type == PIPE_SHADER_TESS_CTRL) value = unpack_param(ctx, ctx->param_tcs_out_lds_layout, 26, 6); else if (ctx->type == PIPE_SHADER_TESS_EVAL) - value = unpack_param(ctx, ctx->param_tcs_offchip_layout, 9, 7); + value = unpack_param(ctx, ctx->param_tcs_offchip_layout, 6, 6); else assert(!"invalid shader stage for TGSI_SEMANTIC_VERTICESIN"); break; |