diff options
| author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-04-18 20:47:31 -0400 |
|---|---|---|
| committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:28 -0400 |
| commit | 5b8afed87115c82cb48913fd47dfbfa347e4faa5 (patch) | |
| tree | 84eff714b71e1f3e5f1b9436e877327480144b0b /src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp | |
| parent | 29990289767c41c162473c9775ad3ba08e7ee9ea (diff) | |
spirv: Replace Constant/ConstantComposite with Const helper
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp index a8f2ea5a0..7bf828995 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_memory.cpp @@ -11,14 +11,14 @@ namespace { Id StorageIndex(EmitContext& ctx, const IR::Value& offset, size_t element_size) { if (offset.IsImmediate()) { const u32 imm_offset{static_cast<u32>(offset.U32() / element_size)}; - return ctx.Constant(ctx.U32[1], imm_offset); + return ctx.Const(imm_offset); } const u32 shift{static_cast<u32>(std::countr_zero(element_size))}; const Id index{ctx.Def(offset)}; if (shift == 0) { return index; } - const Id shift_id{ctx.Constant(ctx.U32[1], shift)}; + const Id shift_id{ctx.Const(shift)}; return ctx.OpShiftRightLogical(ctx.U32[1], index, shift_id); } |
