mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
ac/nir: implement 8-bit ssbo stores
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
b235d77e18
commit
9c5067acf1
1 changed files with 7 additions and 2 deletions
|
|
@ -1555,7 +1555,7 @@ static void visit_store_ssbo(struct ac_nir_context *ctx,
|
|||
|
||||
LLVMValueRef rsrc = ctx->abi->load_ssbo(ctx->abi,
|
||||
get_src(ctx, instr->src[1]), true);
|
||||
LLVMValueRef base_data = ac_to_float(&ctx->ac, src_data);
|
||||
LLVMValueRef base_data = src_data;
|
||||
base_data = ac_trim_vector(&ctx->ac, base_data, instr->num_components);
|
||||
LLVMValueRef base_offset = get_src(ctx, instr->src[2]);
|
||||
|
||||
|
|
@ -1593,7 +1593,12 @@ static void visit_store_ssbo(struct ac_nir_context *ctx,
|
|||
offset = LLVMBuildAdd(ctx->ac.builder, base_offset,
|
||||
LLVMConstInt(ctx->ac.i32, start * elem_size_bytes, false), "");
|
||||
|
||||
if (num_bytes == 2) {
|
||||
if (num_bytes == 1) {
|
||||
ac_build_tbuffer_store_byte(&ctx->ac, rsrc, data,
|
||||
offset, ctx->ac.i32_0,
|
||||
cache_policy & ac_glc,
|
||||
writeonly_memory);
|
||||
} else if (num_bytes == 2) {
|
||||
ac_build_tbuffer_store_short(&ctx->ac, rsrc, data,
|
||||
offset, ctx->ac.i32_0,
|
||||
cache_policy & ac_glc,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue