mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
rsx/d3d12: Move vertex constants filling code to RSXThread
This commit is contained in:
parent
02ce78482c
commit
2ad7051746
7 changed files with 34 additions and 15 deletions
|
@ -586,6 +586,7 @@ namespace rsx
|
|||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds((s64)(1000.0 / limit - rsx->timer_sync.GetElapsedTimeInMilliSec())));
|
||||
rsx->timer_sync.Start();
|
||||
rsx->local_transform_constants.clear();
|
||||
}
|
||||
|
||||
void user_command(thread* rsx, u32 arg)
|
||||
|
@ -1048,6 +1049,18 @@ namespace rsx
|
|||
stream_vector((char*)buffer + 48, 0, 0, 0, (u32&)one);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fill buffer with vertex program constants.
|
||||
* Buffer must be at least 512 float4 wide.
|
||||
*/
|
||||
void thread::fill_vertex_program_constants_data(void *buffer) noexcept
|
||||
{
|
||||
for (const auto &entry : transform_constants)
|
||||
local_transform_constants[entry.first] = entry.second;
|
||||
for (const auto &entry : local_transform_constants)
|
||||
stream_vector_from_memory((char*)buffer + entry.first * 4 * sizeof(float), (void*)entry.second.rgba);
|
||||
}
|
||||
|
||||
u64 thread::timestamp() const
|
||||
{
|
||||
// Get timestamp, and convert it from microseconds to nanoseconds
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue