diff --git a/src/xenia/gpu/shader_translator.cc b/src/xenia/gpu/shader_translator.cc index f919d3c32..937832d12 100644 --- a/src/xenia/gpu/shader_translator.cc +++ b/src/xenia/gpu/shader_translator.cc @@ -777,7 +777,7 @@ void ShaderTranslator::ParseVertexFetchInstruction( i.attributes.exp_adjust = op.exp_adjust(); i.attributes.is_index_rounded = op.is_index_rounded(); i.attributes.is_signed = op.is_signed(); - i.attributes.is_integer = op.is_integer(); + i.attributes.is_integer = op.is_normalized(); i.attributes.prefetch_count = op.prefetch_count(); // Store for later use by mini fetches. diff --git a/src/xenia/gpu/ucode.h b/src/xenia/gpu/ucode.h index d6b693ee5..7ea95366e 100644 --- a/src/xenia/gpu/ucode.h +++ b/src/xenia/gpu/ucode.h @@ -545,8 +545,8 @@ struct VertexFetchInstruction { int exp_adjust() const { return ((static_cast(data_.exp_adjust) << 26) >> 26); } - bool is_signed() const { return data_.is_signed == 1; } - bool is_integer() const { return data_.is_integer == 1; } + bool is_signed() const { return data_.fomat_comp_all == 1; } + bool is_normalized() const { return data_.num_format_all == 0; } bool is_index_rounded() const { return data_.is_index_rounded == 1; } // Dword stride, [0-255]. uint32_t stride() const { return data_.stride; } @@ -575,8 +575,8 @@ struct VertexFetchInstruction { }); XEPACKEDSTRUCTANONYMOUS({ uint32_t dst_swiz : 12; - uint32_t is_signed : 1; - uint32_t is_integer : 1; + uint32_t fomat_comp_all : 1; + uint32_t num_format_all : 1; uint32_t signed_rf_mode_all : 1; uint32_t is_index_rounded : 1; uint32_t format : 6; diff --git a/src/xenia/gpu/vulkan/pipeline_cache.cc b/src/xenia/gpu/vulkan/pipeline_cache.cc index 8a25bff86..ca8806085 100644 --- a/src/xenia/gpu/vulkan/pipeline_cache.cc +++ b/src/xenia/gpu/vulkan/pipeline_cache.cc @@ -1018,22 +1018,32 @@ PipelineCache::UpdateStatus PipelineCache::UpdateVertexInputState( vertex_attrib_descr.format = VK_FORMAT_R16G16B16A16_SFLOAT; break; case VertexFormat::k_32: - // FIXME: Is this a NORM format? - assert_true(is_integer); - vertex_attrib_descr.format = - is_signed ? VK_FORMAT_R32_SINT : VK_FORMAT_R32_UINT; + if (is_integer) { + vertex_attrib_descr.format = + is_signed ? VK_FORMAT_R32_SINT : VK_FORMAT_R32_UINT; + } else { + // No NORM format. + assert_always(); + } break; case VertexFormat::k_32_32: - // FIXME: Is this a NORM format? - assert_true(is_integer); - vertex_attrib_descr.format = - is_signed ? VK_FORMAT_R32G32_SINT : VK_FORMAT_R32G32_UINT; + if (is_integer) { + vertex_attrib_descr.format = + is_signed ? VK_FORMAT_R32G32_SINT : VK_FORMAT_R32G32_UINT; + } else { + // No NORM format. + assert_always(); + } break; case VertexFormat::k_32_32_32_32: - // FIXME: Is this a NORM format? - assert_true(is_integer); - vertex_attrib_descr.format = is_signed ? VK_FORMAT_R32G32B32A32_SINT - : VK_FORMAT_R32G32B32A32_UINT; + if (is_integer) { + vertex_attrib_descr.format = is_signed + ? VK_FORMAT_R32G32B32A32_SINT + : VK_FORMAT_R32G32B32A32_UINT; + } else { + // No NORM format. + assert_always(); + } break; case VertexFormat::k_32_FLOAT: // assert_true(is_signed);