Module: Mesa Branch: master Commit: 30a2f0dfd46de9dbba42ada8d91292b742ed17c8 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=30a2f0dfd46de9dbba42ada8d91292b742ed17c8
Author: Nicolai Hähnle <[email protected]> Date: Wed Aug 23 18:14:32 2017 +0200 radeonsi: add an assertion that only two-dimensional constant references are used v2: remove some redundant checks Acked-by: Roland Scheidegger <[email protected]> (v1) Tested-by: Dieter Nützel <[email protected]> (v1) Reviewed-by: Timothy Arceri <[email protected]> --- src/gallium/drivers/radeonsi/si_shader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 450676c597..0e89ccac09 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1851,10 +1851,11 @@ static LLVMValueRef fetch_constant( return lp_build_gather_values(&ctx->gallivm, values, 4); } - buf = reg->Register.Dimension ? reg->Dimension.Index : 0; + assert(reg->Register.Dimension); + buf = reg->Dimension.Index; idx = reg->Register.Index * 4 + swizzle; - if (reg->Register.Dimension && reg->Dimension.Indirect) { + if (reg->Dimension.Indirect) { LLVMValueRef ptr = LLVMGetParam(ctx->main_fn, ctx->param_const_and_shader_buffers); LLVMValueRef index; index = si_get_bounded_indirect_index(ctx, ®->DimIndirect, _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
