mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
rsx/common/d3d12: Separate int type buffer from float type buffer.
This commit is contained in:
parent
a6ba47265f
commit
35db227af4
@ -44,7 +44,7 @@ namespace
|
||||
{
|
||||
if (static_cast<size_t>(real_input.location) != std::get<0>(attribute))
|
||||
continue;
|
||||
OS << "Buffer<float4> " << std::get<1>(attribute) << "_buffer : register(t" << reg++ << ");\n";
|
||||
OS << "Buffer<" << (real_input.int_type ? "int4" : "float4") << "> " << std::get<1>(attribute) << "_buffer : register(t" << reg++ << ");\n";
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -568,6 +568,25 @@ namespace rsx
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
bool is_int_type(rsx::vertex_base_type type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case rsx::vertex_base_type::s32k:
|
||||
case rsx::vertex_base_type::ub256:
|
||||
return true;
|
||||
case rsx::vertex_base_type::f:
|
||||
case rsx::vertex_base_type::cmp:
|
||||
case rsx::vertex_base_type::sf:
|
||||
case rsx::vertex_base_type::s1:
|
||||
case rsx::vertex_base_type::ub:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::array<u32, 4> thread::get_color_surface_addresses() const
|
||||
{
|
||||
u32 offset_color[] =
|
||||
@ -636,7 +655,8 @@ namespace rsx
|
||||
vertex_arrays_info[index].size,
|
||||
vertex_arrays_info[index].frequency,
|
||||
!!((modulo_mask >> index) & 0x1),
|
||||
true
|
||||
true,
|
||||
is_int_type(vertex_arrays_info[index].type)
|
||||
}
|
||||
);
|
||||
}
|
||||
@ -648,7 +668,8 @@ namespace rsx
|
||||
register_vertex_info[index].size,
|
||||
register_vertex_info[index].frequency,
|
||||
!!((modulo_mask >> index) & 0x1),
|
||||
false
|
||||
false,
|
||||
is_int_type(vertex_arrays_info[index].type)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -197,10 +197,11 @@ struct rsx_vertex_input
|
||||
u16 frequency;
|
||||
bool is_modulo; // either modulo frequency or divide frequency
|
||||
bool is_array; // false if "reg value"
|
||||
bool int_type;
|
||||
|
||||
bool operator==(const rsx_vertex_input other) const
|
||||
{
|
||||
return location == other.location && size == other.size && frequency == other.frequency && is_modulo == other.is_modulo && is_array == other.is_array;
|
||||
return location == other.location && size == other.size && frequency == other.frequency && is_modulo == other.is_modulo && is_array == other.is_array && int_type == other.int_type;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user