diff --git a/src/xenia/gpu/spirv_shader_translator.cc b/src/xenia/gpu/spirv_shader_translator.cc index b0890eced..e4e7e36e2 100644 --- a/src/xenia/gpu/spirv_shader_translator.cc +++ b/src/xenia/gpu/spirv_shader_translator.cc @@ -3333,7 +3333,8 @@ spv::Id SpirvShaderTranslator::EndianSwap128Uint4(spv::Id value, uint_vector_temp_.push_back(3); uint_vector_temp_.push_back(2); value = builder_->createTriOp( - spv::OpSelect, type_uint4_, is_8in64, + spv::OpSelect, type_uint4_, + builder_->smearScalar(spv::NoPrecision, is_8in64, type_bool4_), builder_->createRvalueSwizzle(spv::NoPrecision, type_uint4_, value, uint_vector_temp_), value); @@ -3348,7 +3349,8 @@ spv::Id SpirvShaderTranslator::EndianSwap128Uint4(spv::Id value, uint_vector_temp_.push_back(1); uint_vector_temp_.push_back(0); value = builder_->createTriOp( - spv::OpSelect, type_uint4_, is_8in128, + spv::OpSelect, type_uint4_, + builder_->smearScalar(spv::NoPrecision, is_8in128, type_bool4_), builder_->createRvalueSwizzle(spv::NoPrecision, type_uint4_, value, uint_vector_temp_), value); diff --git a/src/xenia/gpu/spirv_shader_translator_memexport.cc b/src/xenia/gpu/spirv_shader_translator_memexport.cc index ccfad00cd..2ccb706cd 100644 --- a/src/xenia/gpu/spirv_shader_translator_memexport.cc +++ b/src/xenia/gpu/spirv_shader_translator_memexport.cc @@ -172,9 +172,11 @@ void SpirvShaderTranslator::ExportToMemory(uint8_t export_eM) { uint_vector_temp_.push_back(1); uint_vector_temp_.push_back(0); uint_vector_temp_.push_back(3); + spv::Id swap_red_blue_bool4 = + builder_->smearScalar(spv::NoPrecision, swap_red_blue, type_bool4_); for_each_eM([&](uint32_t eM_index) { eM_swapped[eM_index] = builder_->createTriOp( - spv::OpSelect, type_float4_, swap_red_blue, + spv::OpSelect, type_float4_, swap_red_blue_bool4, builder_->createRvalueSwizzle(spv::NoPrecision, type_float4_, eM_original[eM_index], uint_vector_temp_), eM_original[eM_index]);