Adding --max_draw_elements to make debugging easier for now.
This commit is contained in:
parent
96c203699d
commit
5be1b9458a
|
@ -9,6 +9,8 @@
|
|||
|
||||
#include <xenia/gpu/d3d11/d3d11_buffer_resource.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <xenia/gpu/gpu-private.h>
|
||||
#include <xenia/gpu/d3d11/d3d11_resource_cache.h>
|
||||
|
||||
|
@ -131,6 +133,9 @@ int D3D11VertexBufferResource::InvalidateRegion(
|
|||
// TODO(benvanik): rewrite to be faster/special case common/etc
|
||||
uint32_t stride = info_.stride_words;
|
||||
size_t count = (memory_range_.length / 4) / stride;
|
||||
if (FLAGS_max_draw_elements) {
|
||||
count = std::min(FLAGS_max_draw_elements, count);
|
||||
}
|
||||
for (size_t n = 0; n < info_.element_count; n++) {
|
||||
const auto& el = info_.elements[n];
|
||||
const uint32_t* src_ptr = (const uint32_t*)(
|
||||
|
|
|
@ -18,5 +18,7 @@ DECLARE_string(gpu);
|
|||
DECLARE_bool(trace_ring_buffer);
|
||||
DECLARE_string(dump_shaders);
|
||||
|
||||
DECLARE_uint64(max_draw_elements);
|
||||
|
||||
|
||||
#endif // XENIA_GPU_PRIVATE_H_
|
||||
|
|
|
@ -19,6 +19,9 @@ DEFINE_bool(trace_ring_buffer, false, "Trace GPU ring buffer packets.");
|
|||
DEFINE_string(dump_shaders, "",
|
||||
"Path to write GPU shaders to as they are compiled.");
|
||||
|
||||
DEFINE_uint64(max_draw_elements, 0,
|
||||
"Maximum element count; anything over this is ignored.");
|
||||
|
||||
#include <xenia/gpu/nop/nop_gpu.h>
|
||||
std::unique_ptr<GraphicsSystem> xe::gpu::CreateNop(Emulator* emulator) {
|
||||
return xe::gpu::nop::Create(emulator);
|
||||
|
|
Loading…
Reference in New Issue