rebase, fix name shadowing, more const
This commit is contained in:
parent
3c37d66c28
commit
b675c44e49
@ -145,9 +145,9 @@ void CDmaPusher::ExecuteCommand(u32 state_offset, u32 data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CDmaPusher::ThiStateWrite(ThiRegisters& state, u32 offset, u32 argument) {
|
void CDmaPusher::ThiStateWrite(ThiRegisters& state, u32 state_offset, u32 argument) {
|
||||||
u8* const state_offset = reinterpret_cast<u8*>(&state) + sizeof(u32) * offset;
|
u8* const offset_ptr = reinterpret_cast<u8*>(&state) + sizeof(u32) * state_offset;
|
||||||
std::memcpy(state_offset, &argument, sizeof(u32));
|
std::memcpy(offset_ptr, &argument, sizeof(u32));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Tegra
|
} // namespace Tegra
|
||||||
|
@ -134,10 +134,10 @@ void Vic::Execute() {
|
|||||||
|
|
||||||
// Populate luma buffer
|
// Populate luma buffer
|
||||||
for (std::size_t y = 0; y < surface_height - 1; ++y) {
|
for (std::size_t y = 0; y < surface_height - 1; ++y) {
|
||||||
std::size_t src = y * stride;
|
const std::size_t src = y * stride;
|
||||||
std::size_t dst = y * aligned_width;
|
const std::size_t dst = y * aligned_width;
|
||||||
|
|
||||||
std::size_t size = surface_width;
|
const std::size_t size = surface_width;
|
||||||
|
|
||||||
for (std::size_t offset = 0; offset < size; ++offset) {
|
for (std::size_t offset = 0; offset < size; ++offset) {
|
||||||
luma_buffer[dst + offset] = luma_ptr[src + offset];
|
luma_buffer[dst + offset] = luma_ptr[src + offset];
|
||||||
@ -148,8 +148,8 @@ void Vic::Execute() {
|
|||||||
|
|
||||||
// Populate chroma buffer from both channels with interleaving.
|
// Populate chroma buffer from both channels with interleaving.
|
||||||
for (std::size_t y = 0; y < half_height; ++y) {
|
for (std::size_t y = 0; y < half_height; ++y) {
|
||||||
std::size_t src = y * half_stride;
|
const std::size_t src = y * half_stride;
|
||||||
std::size_t dst = y * aligned_width;
|
const std::size_t dst = y * aligned_width;
|
||||||
|
|
||||||
for (std::size_t x = 0; x < half_width; ++x) {
|
for (std::size_t x = 0; x < half_width; ++x) {
|
||||||
chroma_buffer[dst + x * 2] = chroma_b_ptr[src + x];
|
chroma_buffer[dst + x * 2] = chroma_b_ptr[src + x];
|
||||||
|
@ -493,8 +493,7 @@ void GPU::PushCommandBuffer(Tegra::ChCommandHeaderList& entries) {
|
|||||||
// TODO(ameerj): RE proper async nvdec operation
|
// TODO(ameerj): RE proper async nvdec operation
|
||||||
// gpu_thread.SubmitCommandBuffer(std::move(entries));
|
// gpu_thread.SubmitCommandBuffer(std::move(entries));
|
||||||
|
|
||||||
cdma_pusher->Push(std::move(entries));
|
cdma_pusher->ProcessEntries(std::move(entries));
|
||||||
cdma_pusher->DispatchCalls();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPU::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
|
void GPU::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
|
||||||
|
@ -49,7 +49,7 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer,
|
|||||||
} else if (auto* command_list = std::get_if<SubmitChCommandEntries>(&next.data)) {
|
} else if (auto* command_list = std::get_if<SubmitChCommandEntries>(&next.data)) {
|
||||||
// NVDEC
|
// NVDEC
|
||||||
cdma_pusher.ProcessEntries(std::move(command_list->entries));
|
cdma_pusher.ProcessEntries(std::move(command_list->entries));
|
||||||
} else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) {
|
} else if (const auto* data = std::get_if<SwapBuffersCommand>(&next.data)) {
|
||||||
renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr);
|
renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr);
|
||||||
} else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) {
|
} else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) {
|
||||||
rasterizer->ReleaseFences();
|
rasterizer->ReleaseFences();
|
||||||
|
Loading…
Reference in New Issue
Block a user