summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend/ir')
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.cpp8
-rw-r--r--src/shader_recompiler/frontend/ir/ir_emitter.h3
-rw-r--r--src/shader_recompiler/frontend/ir/modifiers.h3
3 files changed, 13 insertions, 1 deletions
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.cpp b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
index 556961fa4..d94596ee9 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.cpp
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.cpp
@@ -512,6 +512,14 @@ Value IREmitter::UnpackFloat2x16(const U32& value) {
512 return Inst(Opcode::UnpackFloat2x16, value); 512 return Inst(Opcode::UnpackFloat2x16, value);
513} 513}
514 514
515U32 IREmitter::PackHalf2x16(const Value& vector) {
516 return Inst<U32>(Opcode::PackHalf2x16, vector);
517}
518
519Value IREmitter::UnpackHalf2x16(const U32& value) {
520 return Inst(Opcode::UnpackHalf2x16, value);
521}
522
515F64 IREmitter::PackDouble2x32(const Value& vector) { 523F64 IREmitter::PackDouble2x32(const Value& vector) {
516 return Inst<F64>(Opcode::PackDouble2x32, vector); 524 return Inst<F64>(Opcode::PackDouble2x32, vector);
517} 525}
diff --git a/src/shader_recompiler/frontend/ir/ir_emitter.h b/src/shader_recompiler/frontend/ir/ir_emitter.h
index 74fb3dbcb..27ff5a29d 100644
--- a/src/shader_recompiler/frontend/ir/ir_emitter.h
+++ b/src/shader_recompiler/frontend/ir/ir_emitter.h
@@ -115,6 +115,9 @@ public:
115 [[nodiscard]] U32 PackFloat2x16(const Value& vector); 115 [[nodiscard]] U32 PackFloat2x16(const Value& vector);
116 [[nodiscard]] Value UnpackFloat2x16(const U32& value); 116 [[nodiscard]] Value UnpackFloat2x16(const U32& value);
117 117
118 [[nodiscard]] U32 PackHalf2x16(const Value& vector);
119 [[nodiscard]] Value UnpackHalf2x16(const U32& value);
120
118 [[nodiscard]] F64 PackDouble2x32(const Value& vector); 121 [[nodiscard]] F64 PackDouble2x32(const Value& vector);
119 [[nodiscard]] Value UnpackDouble2x32(const F64& value); 122 [[nodiscard]] Value UnpackDouble2x32(const F64& value);
120 123
diff --git a/src/shader_recompiler/frontend/ir/modifiers.h b/src/shader_recompiler/frontend/ir/modifiers.h
index ad07700ae..308c00153 100644
--- a/src/shader_recompiler/frontend/ir/modifiers.h
+++ b/src/shader_recompiler/frontend/ir/modifiers.h
@@ -36,7 +36,8 @@ union TextureInstInfo {
36 u32 raw; 36 u32 raw;
37 BitField<0, 8, TextureType> type; 37 BitField<0, 8, TextureType> type;
38 BitField<8, 1, u32> has_bias; 38 BitField<8, 1, u32> has_bias;
39 BitField<16, 1, u32> has_lod_clamp; 39 BitField<9, 1, u32> has_lod_clamp;
40 BitField<10, 1, u32> relaxed_precision;
40}; 41};
41static_assert(sizeof(TextureInstInfo) <= sizeof(u32)); 42static_assert(sizeof(TextureInstInfo) <= sizeof(u32));
42 43