ac/nir: Fix store_scratch with a non-full writemask

By adding one more helper to ac_llvm_build, we can also easily keep
vector stores together.

Fixes the
tests/spec/glsl-1.30/execution/fs-large-local-array-vec4.shader_test
piglit test.

Fixes: 74470baebb ("ac/nir: Lower large indirect variables to scratch")
Reviewed-by: Marek Olšák <marek.olsak@amd.com
This commit is contained in:
Connor Abbott
2019-08-16 12:46:27 +02:00
parent 0e394cda0d
commit c550d367a7
3 changed files with 42 additions and 5 deletions

View File

@@ -190,6 +190,13 @@ LLVMValueRef
ac_build_gather_values(struct ac_llvm_context *ctx,
LLVMValueRef *values,
unsigned value_count);
LLVMValueRef
ac_extract_components(struct ac_llvm_context *ctx,
LLVMValueRef value,
unsigned start,
unsigned channels);
LLVMValueRef ac_build_expand_to_vec4(struct ac_llvm_context *ctx,
LLVMValueRef value,
unsigned num_channels);