[GPU] Common resolve code based on compute shaders, swap MSAA samples 1 and 2, change ROV write rounding, random refactoring
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "xenia/base/filesystem.h"
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/string.h"
|
||||
#include "xenia/gpu/xenos.h"
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
@@ -230,10 +231,9 @@ void TraceWriter::WriteMemoryCommand(TraceCommandType type, uint32_t base_ptr,
|
||||
}
|
||||
}
|
||||
|
||||
void TraceWriter::WriteEDRAMSnapshot(const void* snapshot) {
|
||||
const uint32_t kEDRAMSize = 10 * 1024 * 1024;
|
||||
EDRAMSnapshotCommand cmd;
|
||||
cmd.type = TraceCommandType::kEDRAMSnapshot;
|
||||
void TraceWriter::WriteEdramSnapshot(const void* snapshot) {
|
||||
EdramSnapshotCommand cmd;
|
||||
cmd.type = TraceCommandType::kEdramSnapshot;
|
||||
if (compress_output_) {
|
||||
// Write the header now so we reserve space in the buffer.
|
||||
long header_position = std::ftell(file_);
|
||||
@@ -242,7 +242,7 @@ void TraceWriter::WriteEDRAMSnapshot(const void* snapshot) {
|
||||
|
||||
// Stream the content right to the buffer.
|
||||
snappy::ByteArraySource snappy_source(
|
||||
reinterpret_cast<const char*>(snapshot), kEDRAMSize);
|
||||
reinterpret_cast<const char*>(snapshot), xenos::kEdramSizeBytes);
|
||||
SnappySink snappy_sink(file_);
|
||||
cmd.encoded_length =
|
||||
static_cast<uint32_t>(snappy::Compress(&snappy_source, &snappy_sink));
|
||||
@@ -255,9 +255,9 @@ void TraceWriter::WriteEDRAMSnapshot(const void* snapshot) {
|
||||
} else {
|
||||
// Uncompressed - write buffer directly to the file.
|
||||
cmd.encoding_format = MemoryEncodingFormat::kNone;
|
||||
cmd.encoded_length = kEDRAMSize;
|
||||
cmd.encoded_length = xenos::kEdramSizeBytes;
|
||||
fwrite(&cmd, 1, sizeof(cmd), file_);
|
||||
fwrite(snapshot, 1, kEDRAMSize, file_);
|
||||
fwrite(snapshot, 1, xenos::kEdramSizeBytes, file_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user