Skeleton of new shared GPU files.

This commit is contained in:
Ben Vanik 2014-06-02 19:24:33 -07:00
parent beb5ee40ee
commit 4072640a64
16 changed files with 346 additions and 64 deletions

View File

@ -0,0 +1,17 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/gpu/buffer_resource.h>
using namespace std;
using namespace xe;
using namespace xe::gpu;
using namespace xe::gpu::xenos;

View File

@ -0,0 +1,30 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_BUFFER_RESOURCE_H_
#define XENIA_GPU_BUFFER_RESOURCE_H_
#include <xenia/core.h>
#include <xenia/gpu/xenos/xenos.h>
namespace xe {
namespace gpu {
class BufferResource : public Resource {
public:
};
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_BUFFER_RESOURCE_H_

View File

@ -1,49 +0,0 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_COMMAND_BUFFER_H_
#define XENIA_GPU_COMMAND_BUFFER_H_
#include <xenia/core.h>
namespace xe {
namespace gpu {
// TODO(benvanik): command packet types.
class CommandBuffer {
public:
CommandBuffer(xe_memory_ref memory) {
memory_ = xe_memory_retain(memory);
}
virtual ~CommandBuffer() {
xe_memory_release(memory_);
}
xe_memory_ref memory() {
return memory_;
}
// TODO(benvanik): command methods.
virtual void Foo() = 0;
protected:
xe_memory_ref memory_;
};
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_COMMAND_BUFFER_H_

View File

@ -0,0 +1,17 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/gpu/command_processor.h>
using namespace std;
using namespace xe;
using namespace xe::gpu;
using namespace xe::gpu::xenos;

View File

@ -0,0 +1,30 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_COMMAND_PROCESSOR_H_
#define XENIA_GPU_COMMAND_PROCESSOR_H_
#include <xenia/core.h>
#include <xenia/gpu/xenos/xenos.h>
namespace xe {
namespace gpu {
class CommandProcessor {
public:
};
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_COMMAND_PROCESSOR_H_

View File

@ -0,0 +1,17 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/gpu/register_file.h>
using namespace std;
using namespace xe;
using namespace xe::gpu;
using namespace xe::gpu::xenos;

View File

@ -0,0 +1,30 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_REGISTER_FILE_H_
#define XENIA_GPU_REGISTER_FILE_H_
#include <xenia/core.h>
#include <xenia/gpu/xenos/xenos.h>
namespace xe {
namespace gpu {
class RegisterFile {
public:
};
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_REGISTER_FILE_H_

17
src/xenia/gpu/resource.cc Normal file
View File

@ -0,0 +1,17 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/gpu/resource.h>
using namespace std;
using namespace xe;
using namespace xe::gpu;
using namespace xe::gpu::xenos;

30
src/xenia/gpu/resource.h Normal file
View File

@ -0,0 +1,30 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_RESOURCE_H_
#define XENIA_GPU_RESOURCE_H_
#include <xenia/core.h>
#include <xenia/gpu/xenos/xenos.h>
namespace xe {
namespace gpu {
class Resource {
public:
};
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_RESOURCE_H_

View File

@ -0,0 +1,17 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/gpu/resource_cache.h>
using namespace std;
using namespace xe;
using namespace xe::gpu;
using namespace xe::gpu::xenos;

View File

@ -0,0 +1,30 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_RESOURCE_CACHE_H_
#define XENIA_GPU_RESOURCE_CACHE_H_
#include <xenia/core.h>
#include <xenia/gpu/xenos/xenos.h>
namespace xe {
namespace gpu {
class ResourceCache {
public:
};
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_RESOURCE_CACHE_H_

View File

@ -0,0 +1,17 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/gpu/shader_resource.h>
using namespace std;
using namespace xe;
using namespace xe::gpu;
using namespace xe::gpu::xenos;

View File

@ -0,0 +1,30 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_SHADER_RESOURCE_H_
#define XENIA_GPU_SHADER_RESOURCE_H_
#include <xenia/core.h>
#include <xenia/gpu/xenos/xenos.h>
namespace xe {
namespace gpu {
class ShaderResource : public Resource {
public:
};
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_SHADER_RESOURCE_H_

View File

@ -1,11 +1,10 @@
# Copyright 2013 Ben Vanik. All Rights Reserved. # Copyright 2013 Ben Vanik. All Rights Reserved.
{ {
'sources': [ 'sources': [
'buffer.cc', 'buffer_resource.cc',
'buffer.h', 'buffer_resource.h',
'buffer_cache.cc', 'command_processor.cc',
'buffer_cache.h', 'command_processor.h',
'command_buffer.h',
'gpu-private.h', 'gpu-private.h',
'gpu.cc', 'gpu.cc',
'gpu.h', 'gpu.h',
@ -13,16 +12,16 @@
'graphics_driver.h', 'graphics_driver.h',
'graphics_system.cc', 'graphics_system.cc',
'graphics_system.h', 'graphics_system.h',
'ring_buffer_worker.cc', 'register_file.cc',
'ring_buffer_worker.h', 'register_file.h',
'shader.cc', 'resource.cc',
'shader.h', 'resource.h',
'shader_cache.cc', 'resource_cache.cc',
'shader_cache.h', 'resource_cache.h',
'texture.cc', 'shader_resource.cc',
'texture.h', 'shader_resource.h',
'texture_cache.cc', 'texture_resource.cc',
'texture_cache.h', 'texture_resource.h',
], ],
'includes': [ 'includes': [

View File

@ -0,0 +1,17 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <xenia/gpu/texture_resource.h>
using namespace std;
using namespace xe;
using namespace xe::gpu;
using namespace xe::gpu::xenos;

View File

@ -0,0 +1,33 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_GPU_TEXTURE_RESOURCE_H_
#define XENIA_GPU_TEXTURE_RESOURCE_H_
#include <xenia/core.h>
#include <xenia/gpu/xenos/xenos.h>
// TODO(benvanik): replace DXGI constants with xenia constants.
#include <d3d11.h>
namespace xe {
namespace gpu {
class TextureResource : public Resource {
public:
};
} // namespace gpu
} // namespace xe
#endif // XENIA_GPU_TEXTURE_RESOURCE_H_