Browse Source
kepler_compute: Fixup assert and rename engines
kepler_compute: Fixup assert and rename engines
When I originally added the compute assert I used the wrong documentation. This addresses that. The dispatch register was tested with homebrew against hardware and is triggered by some games (e.g. Super Mario Odyssey). What exactly is missing to get a valid program bound by this engine requires more investigation.nce_cpp
6 changed files with 59 additions and 52 deletions
-
4src/video_core/CMakeLists.txt
-
34src/video_core/engines/kepler_compute.cpp
-
31src/video_core/engines/kepler_compute.h
-
28src/video_core/engines/maxwell_compute.cpp
-
8src/video_core/gpu.cpp
-
6src/video_core/gpu.h
@ -0,0 +1,34 @@ |
|||
// Copyright 2018 yuzu Emulator Project
|
|||
// Licensed under GPLv2 or any later version
|
|||
// Refer to the license.txt file included.
|
|||
|
|||
#include "common/logging/log.h"
|
|||
#include "core/core.h"
|
|||
#include "core/memory.h"
|
|||
#include "video_core/engines/kepler_compute.h"
|
|||
#include "video_core/memory_manager.h"
|
|||
|
|||
namespace Tegra::Engines { |
|||
|
|||
KeplerCompute::KeplerCompute(MemoryManager& memory_manager) : memory_manager{memory_manager} {} |
|||
|
|||
KeplerCompute::~KeplerCompute() = default; |
|||
|
|||
void KeplerCompute::CallMethod(const GPU::MethodCall& method_call) { |
|||
ASSERT_MSG(method_call.method < Regs::NUM_REGS, |
|||
"Invalid KeplerCompute register, increase the size of the Regs structure"); |
|||
|
|||
regs.reg_array[method_call.method] = method_call.argument; |
|||
|
|||
switch (method_call.method) { |
|||
case KEPLER_COMPUTE_REG_INDEX(launch): |
|||
// Abort execution since compute shaders can be used to alter game memory (e.g. CUDA
|
|||
// kernels)
|
|||
UNREACHABLE_MSG("Compute shaders are not implemented"); |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
} |
|||
|
|||
} // namespace Tegra::Engines
|
|||
@ -1,28 +0,0 @@ |
|||
// Copyright 2018 yuzu Emulator Project
|
|||
// Licensed under GPLv2 or any later version
|
|||
// Refer to the license.txt file included.
|
|||
|
|||
#include "common/logging/log.h"
|
|||
#include "core/core.h"
|
|||
#include "video_core/engines/maxwell_compute.h"
|
|||
|
|||
namespace Tegra::Engines { |
|||
|
|||
void MaxwellCompute::CallMethod(const GPU::MethodCall& method_call) { |
|||
ASSERT_MSG(method_call.method < Regs::NUM_REGS, |
|||
"Invalid MaxwellCompute register, increase the size of the Regs structure"); |
|||
|
|||
regs.reg_array[method_call.method] = method_call.argument; |
|||
|
|||
switch (method_call.method) { |
|||
case MAXWELL_COMPUTE_REG_INDEX(compute): { |
|||
LOG_CRITICAL(HW_GPU, "Compute shaders are not implemented"); |
|||
UNREACHABLE(); |
|||
break; |
|||
} |
|||
default: |
|||
break; |
|||
} |
|||
} |
|||
|
|||
} // namespace Tegra::Engines
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue