diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-03-01 21:58:16 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:23 +0200 |
commit | 103b9da4f7115ff47eee52d0dbd31b5b7a18b257 (patch) | |
tree | 52e00b1766326559fad61cefa460b6666d2792c9 /src/shader_recompiler/backend | |
parent | shader: Implement ISET, add common_funcs (diff) | |
download | yuzu-103b9da4f7115ff47eee52d0dbd31b5b7a18b257.tar yuzu-103b9da4f7115ff47eee52d0dbd31b5b7a18b257.tar.gz yuzu-103b9da4f7115ff47eee52d0dbd31b5b7a18b257.tar.bz2 yuzu-103b9da4f7115ff47eee52d0dbd31b5b7a18b257.tar.lz yuzu-103b9da4f7115ff47eee52d0dbd31b5b7a18b257.tar.xz yuzu-103b9da4f7115ff47eee52d0dbd31b5b7a18b257.tar.zst yuzu-103b9da4f7115ff47eee52d0dbd31b5b7a18b257.zip |
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv.h | 4 | ||||
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.h b/src/shader_recompiler/backend/spirv/emit_spirv.h index 4d00b235d..5446d6ab6 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.h +++ b/src/shader_recompiler/backend/spirv/emit_spirv.h @@ -229,7 +229,9 @@ Id EmitBitFieldSExtract(EmitContext& ctx, Id base, Id offset, Id count); Id EmitBitFieldUExtract(EmitContext& ctx, Id base, Id offset, Id count); Id EmitBitReverse32(EmitContext& ctx, Id value); Id EmitBitCount32(EmitContext& ctx, Id value); -Id EmitBitwiseNot32(EmitContext& ctx, Id a); +Id EmitBitwiseNot32(EmitContext& ctx, Id value); +Id EmitFindSMsb32(EmitContext& ctx, Id value); +Id EmitFindUMsb32(EmitContext& ctx, Id value); Id EmitSMin32(EmitContext& ctx, Id a, Id b); Id EmitUMin32(EmitContext& ctx, Id a, Id b); Id EmitSMax32(EmitContext& ctx, Id a, Id b); diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp index 5bdd943a4..162fb6a91 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp @@ -110,8 +110,16 @@ Id EmitBitCount32(EmitContext& ctx, Id value) { return ctx.OpBitCount(ctx.U32[1], value); } -Id EmitBitwiseNot32(EmitContext& ctx, Id a) { - return ctx.OpNot(ctx.U32[1], a); +Id EmitBitwiseNot32(EmitContext& ctx, Id value) { + return ctx.OpNot(ctx.U32[1], value); +} + +Id EmitFindSMsb32(EmitContext& ctx, Id value) { + return ctx.OpFindSMsb(ctx.U32[1], value); +} + +Id EmitFindUMsb32(EmitContext& ctx, Id value) { + return ctx.OpFindUMsb(ctx.U32[1], value); } Id EmitSMin32(EmitContext& ctx, Id a, Id b) { |