nir: Add alignment information to cast derefs
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6472>
This commit is contained in:
committed by
Marge Bot
parent
a0b82c24b6
commit
878a8daca6
@@ -1037,6 +1037,8 @@ write_deref(write_ctx *ctx, const nir_deref_instr *deref)
|
||||
case nir_deref_type_cast:
|
||||
write_src(ctx, &deref->parent);
|
||||
blob_write_uint32(ctx->blob, deref->cast.ptr_stride);
|
||||
blob_write_uint32(ctx->blob, deref->cast.align_mul);
|
||||
blob_write_uint32(ctx->blob, deref->cast.align_offset);
|
||||
if (!header.deref.cast_type_same_as_last) {
|
||||
encode_type_to_blob(ctx->blob, deref->type);
|
||||
ctx->last_type = deref->type;
|
||||
@@ -1101,6 +1103,8 @@ read_deref(read_ctx *ctx, union packed_instr header)
|
||||
case nir_deref_type_cast:
|
||||
read_src(ctx, &deref->parent, &deref->instr);
|
||||
deref->cast.ptr_stride = blob_read_uint32(ctx->blob);
|
||||
deref->cast.align_mul = blob_read_uint32(ctx->blob);
|
||||
deref->cast.align_offset = blob_read_uint32(ctx->blob);
|
||||
if (header.deref.cast_type_same_as_last) {
|
||||
deref->type = ctx->last_type;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user