mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
gl/vk/rsx: Add a cross-platform overlay text; Minor perf improvements and rsx bugfixes (#2196)
* gl/rsx: Implement platform-agnostic text overlays gl: Restore performance metrics using new text out helper gl/rsx: Refactor text generation class * vk: Enable text overlay gl/vk: Polish overlay counters implementation gl: Better resource shutdown for text writer * gl: Optimization, do not rebind TIUs every frame. Speedup * gl: Optimizations and improvements to vertex upload code * gl/vk: Texture format swizzles vk: Texture format fix vk: Fix YX format swizzles * rsx: Decode vertex texture index
This commit is contained in:
parent
7a9841bb2a
commit
8454949eea
20 changed files with 1016 additions and 79 deletions
|
@ -38,6 +38,41 @@ struct GLTraits
|
|||
.make();
|
||||
__glcheck result.use();
|
||||
|
||||
//Progam locations are guaranteed to not change after linking
|
||||
//Texture locations are simply bound to the TIUs so this can be done once
|
||||
for (int i = 0; i < rsx::limits::fragment_textures_count; ++i)
|
||||
{
|
||||
int location;
|
||||
if (result.uniforms.has_location("tex" + std::to_string(i), &location))
|
||||
result.uniforms[location] = i;
|
||||
}
|
||||
|
||||
for (int i = 0; i < rsx::limits::vertex_textures_count; ++i)
|
||||
{
|
||||
int location;
|
||||
if (result.uniforms.has_location("vtex" + std::to_string(i), &location))
|
||||
result.uniforms[location] = (i + rsx::limits::fragment_textures_count);
|
||||
}
|
||||
|
||||
//We use texture buffers for vertex attributes. Bind these here as well
|
||||
//as they are guaranteed to be fixed (1 to 1 mapping)
|
||||
std::array<const char*, 16> s_reg_table =
|
||||
{
|
||||
"in_pos_buffer", "in_weight_buffer", "in_normal_buffer",
|
||||
"in_diff_color_buffer", "in_spec_color_buffer",
|
||||
"in_fog_buffer",
|
||||
"in_point_size_buffer", "in_7_buffer",
|
||||
"in_tc0_buffer", "in_tc1_buffer", "in_tc2_buffer", "in_tc3_buffer",
|
||||
"in_tc4_buffer", "in_tc5_buffer", "in_tc6_buffer", "in_tc7_buffer"
|
||||
};
|
||||
|
||||
for (int i = 0; i < rsx::limits::vertex_count; ++i)
|
||||
{
|
||||
int location;
|
||||
if (result.uniforms.has_location(s_reg_table[i], &location))
|
||||
result.uniforms[location] = (i + rsx::limits::fragment_textures_count + rsx::limits::vertex_textures_count);
|
||||
}
|
||||
|
||||
LOG_NOTICE(RSX, "*** prog id = %d", result.id());
|
||||
LOG_NOTICE(RSX, "*** vp id = %d", vertexProgramData.id);
|
||||
LOG_NOTICE(RSX, "*** fp id = %d", fragmentProgramData.id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue