diff options
author | Nicolai Hähnle <[email protected]> | 2019-03-29 23:03:51 +0100 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2019-05-13 17:07:23 +0200 |
commit | 81fe33735a5562ac224679ce548ee90b0d3f3402 (patch) | |
tree | c6761c048a6b55524b9f9933342f059d0be428d3 /src/amd/common/ac_llvm_build.h | |
parent | 712f99934cda7e4bf3f25b8b1f72218ed8113eda (diff) |
amd/common: add ac_build_opencoded_fetch_format
Implement software emulation of buffer_load_format for all types required
by vertex buffer fetches.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/amd/common/ac_llvm_build.h')
-rw-r--r-- | src/amd/common/ac_llvm_build.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h index 98f856106d6..c284526727a 100644 --- a/src/amd/common/ac_llvm_build.h +++ b/src/amd/common/ac_llvm_build.h @@ -357,6 +357,36 @@ ac_build_raw_tbuffer_load(struct ac_llvm_context *ctx, bool slc, bool can_speculate); +/* For ac_build_fetch_format. + * + * Note: FLOAT must be 0 (used for convenience of encoding in radeonsi). + */ +enum { + AC_FETCH_FORMAT_FLOAT = 0, + AC_FETCH_FORMAT_FIXED, + AC_FETCH_FORMAT_UNORM, + AC_FETCH_FORMAT_SNORM, + AC_FETCH_FORMAT_USCALED, + AC_FETCH_FORMAT_SSCALED, + AC_FETCH_FORMAT_UINT, + AC_FETCH_FORMAT_SINT, +}; + +LLVMValueRef +ac_build_opencoded_load_format(struct ac_llvm_context *ctx, + unsigned log_size, + unsigned num_channels, + unsigned format, + bool reverse, + bool known_aligned, + LLVMValueRef rsrc, + LLVMValueRef vindex, + LLVMValueRef voffset, + LLVMValueRef soffset, + bool glc, + bool slc, + bool can_speculate); + void ac_build_tbuffer_store_short(struct ac_llvm_context *ctx, LLVMValueRef rsrc, |