early-access version 2725
This commit is contained in:
parent
dc2a265164
commit
b6d4502249
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2724.
|
This is the source code for early-access 2725.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -173,6 +173,8 @@ void Maxwell3D::ProcessMethodCall(u32 method, u32 argument, u32 nonshadow_argume
|
|||||||
case MAXWELL3D_REG_INDEX(shadow_ram_control):
|
case MAXWELL3D_REG_INDEX(shadow_ram_control):
|
||||||
shadow_state.shadow_ram_control = static_cast<Regs::ShadowRamControl>(nonshadow_argument);
|
shadow_state.shadow_ram_control = static_cast<Regs::ShadowRamControl>(nonshadow_argument);
|
||||||
return;
|
return;
|
||||||
|
case MAXWELL3D_REG_INDEX(macros.upload_address):
|
||||||
|
return macro_engine->ClearCode(regs.macros.upload_address);
|
||||||
case MAXWELL3D_REG_INDEX(macros.data):
|
case MAXWELL3D_REG_INDEX(macros.data):
|
||||||
return macro_engine->AddCode(regs.macros.upload_address, argument);
|
return macro_engine->AddCode(regs.macros.upload_address, argument);
|
||||||
case MAXWELL3D_REG_INDEX(macros.bind):
|
case MAXWELL3D_REG_INDEX(macros.bind):
|
||||||
|
@ -134,7 +134,8 @@ void MaxwellDMA::CopyBlockLinearToPitch() {
|
|||||||
|
|
||||||
// Deswizzle the input and copy it over.
|
// Deswizzle the input and copy it over.
|
||||||
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
|
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
|
||||||
const u32 bytes_per_pixel = 1;
|
const u32 bytes_per_pixel =
|
||||||
|
regs.launch_dma.remap_enable ? regs.pitch_out / regs.line_length_in : 1;
|
||||||
const Parameters& src_params = regs.src_params;
|
const Parameters& src_params = regs.src_params;
|
||||||
const u32 width = src_params.width;
|
const u32 width = src_params.width;
|
||||||
const u32 height = src_params.height;
|
const u32 height = src_params.height;
|
||||||
@ -166,7 +167,8 @@ void MaxwellDMA::CopyPitchToBlockLinear() {
|
|||||||
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
|
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
|
||||||
|
|
||||||
const auto& dst_params = regs.dst_params;
|
const auto& dst_params = regs.dst_params;
|
||||||
const u32 bytes_per_pixel = 1;
|
const u32 bytes_per_pixel =
|
||||||
|
regs.launch_dma.remap_enable ? regs.pitch_in / regs.line_length_in : 1;
|
||||||
const u32 width = dst_params.width;
|
const u32 width = dst_params.width;
|
||||||
const u32 height = dst_params.height;
|
const u32 height = dst_params.height;
|
||||||
const u32 depth = dst_params.depth;
|
const u32 depth = dst_params.depth;
|
||||||
@ -210,7 +212,8 @@ void MaxwellDMA::CopyPitchToBlockLinear() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MaxwellDMA::FastCopyBlockLinearToPitch() {
|
void MaxwellDMA::FastCopyBlockLinearToPitch() {
|
||||||
const u32 bytes_per_pixel = 1;
|
const u32 bytes_per_pixel =
|
||||||
|
regs.launch_dma.remap_enable ? regs.pitch_out / regs.line_length_in : 1;
|
||||||
const size_t src_size = GOB_SIZE;
|
const size_t src_size = GOB_SIZE;
|
||||||
const size_t dst_size = static_cast<size_t>(regs.pitch_out) * regs.line_count;
|
const size_t dst_size = static_cast<size_t>(regs.pitch_out) * regs.line_count;
|
||||||
u32 pos_x = regs.src_params.origin.x;
|
u32 pos_x = regs.src_params.origin.x;
|
||||||
|
@ -45,6 +45,11 @@ void MacroEngine::AddCode(u32 method, u32 data) {
|
|||||||
uploaded_macro_code[method].push_back(data);
|
uploaded_macro_code[method].push_back(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroEngine::ClearCode(u32 method) {
|
||||||
|
macro_cache.erase(method);
|
||||||
|
uploaded_macro_code.erase(method);
|
||||||
|
}
|
||||||
|
|
||||||
void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) {
|
void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) {
|
||||||
auto compiled_macro = macro_cache.find(method);
|
auto compiled_macro = macro_cache.find(method);
|
||||||
if (compiled_macro != macro_cache.end()) {
|
if (compiled_macro != macro_cache.end()) {
|
||||||
|
@ -117,6 +117,9 @@ public:
|
|||||||
// Store the uploaded macro code to compile them when they're called.
|
// Store the uploaded macro code to compile them when they're called.
|
||||||
void AddCode(u32 method, u32 data);
|
void AddCode(u32 method, u32 data);
|
||||||
|
|
||||||
|
// Clear the code associated with a method.
|
||||||
|
void ClearCode(u32 method);
|
||||||
|
|
||||||
// Compiles the macro if its not in the cache, and executes the compiled macro
|
// Compiles the macro if its not in the cache, and executes the compiled macro
|
||||||
void Execute(u32 method, const std::vector<u32>& parameters);
|
void Execute(u32 method, const std::vector<u32>& parameters);
|
||||||
|
|
||||||
|
@ -784,8 +784,8 @@ void RasterizerVulkan::UpdateStencilFaces(Tegra::Engines::Maxwell3D::Regs& regs)
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Front face defines both faces
|
// Front face defines both faces
|
||||||
scheduler.Record([ref = regs.stencil_back_func_ref, write_mask = regs.stencil_back_mask,
|
scheduler.Record([ref = regs.stencil_front_func_ref, write_mask = regs.stencil_front_mask,
|
||||||
test_mask = regs.stencil_back_func_mask](vk::CommandBuffer cmdbuf) {
|
test_mask = regs.stencil_front_func_mask](vk::CommandBuffer cmdbuf) {
|
||||||
cmdbuf.SetStencilReference(VK_STENCIL_FACE_FRONT_AND_BACK, ref);
|
cmdbuf.SetStencilReference(VK_STENCIL_FACE_FRONT_AND_BACK, ref);
|
||||||
cmdbuf.SetStencilWriteMask(VK_STENCIL_FACE_FRONT_AND_BACK, write_mask);
|
cmdbuf.SetStencilWriteMask(VK_STENCIL_FACE_FRONT_AND_BACK, write_mask);
|
||||||
cmdbuf.SetStencilCompareMask(VK_STENCIL_FACE_FRONT_AND_BACK, test_mask);
|
cmdbuf.SetStencilCompareMask(VK_STENCIL_FACE_FRONT_AND_BACK, test_mask);
|
||||||
|
Loading…
Reference in New Issue
Block a user