summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-05-23 05:40:43 +0200
committerbunnei <bunneidev@gmail.com>2015-05-31 07:27:50 +0200
commit4ac6c1a3b51b80cfd5b914fe87cf4a4663eeea32 (patch)
treec26280609c133041c69c988e0297e37d49d886a9
parentvertex_shader: Implement MIN instruction. (diff)
downloadyuzu-4ac6c1a3b51b80cfd5b914fe87cf4a4663eeea32.tar
yuzu-4ac6c1a3b51b80cfd5b914fe87cf4a4663eeea32.tar.gz
yuzu-4ac6c1a3b51b80cfd5b914fe87cf4a4663eeea32.tar.bz2
yuzu-4ac6c1a3b51b80cfd5b914fe87cf4a4663eeea32.tar.lz
yuzu-4ac6c1a3b51b80cfd5b914fe87cf4a4663eeea32.tar.xz
yuzu-4ac6c1a3b51b80cfd5b914fe87cf4a4663eeea32.tar.zst
yuzu-4ac6c1a3b51b80cfd5b914fe87cf4a4663eeea32.zip
-rw-r--r--src/video_core/vertex_shader.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp
index 582712bde..ac4483659 100644
--- a/src/video_core/vertex_shader.cpp
+++ b/src/video_core/vertex_shader.cpp
@@ -120,10 +120,6 @@ static void ProcessShaderCode(VertexShaderState& state) {
case OpCode::Type::Arithmetic:
{
bool is_inverted = 0 != (instr.opcode.Value().GetInfo().subtype & OpCode::Info::SrcInversed);
- // TODO: We don't really support this properly: For instance, the address register
- // offset needs to be applied to SRC2 instead, etc.
- // For now, we just abort in this situation.
- ASSERT_MSG(!is_inverted, "Bad condition...");
const int address_offset = (instr.common.address_register_index == 0)
? 0 : state.address_registers[instr.common.address_register_index - 1];
@@ -288,6 +284,16 @@ static void ProcessShaderCode(VertexShaderState& state) {
break;
}
+ case OpCode::Id::SLT:
+ case OpCode::Id::SLTI:
+ for (int i = 0; i < 4; ++i) {
+ if (!swizzle.DestComponentEnabled(i))
+ continue;
+
+ dest[i] = (src1[i] < src2[i]) ? float24::FromFloat32(1.0f) : float24::FromFloat32(0.0f);
+ }
+ break;
+
case OpCode::Id::CMP:
for (int i = 0; i < 2; ++i) {
// TODO: Can you restrict to one compare via dest masking?