mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge pull request #7869 from stenzek/d3dcommon
D3D: Move sharable D3D11/D3D12 code to common library
This commit is contained in:
@ -39,8 +39,6 @@
|
||||
|
||||
namespace OGL
|
||||
{
|
||||
static constexpr u32 UBO_LENGTH = 32 * 1024 * 1024;
|
||||
|
||||
u32 ProgramShaderCache::s_ubo_buffer_size;
|
||||
s32 ProgramShaderCache::s_ubo_align;
|
||||
GLuint ProgramShaderCache::s_attributeless_VBO = 0;
|
||||
@ -497,7 +495,7 @@ void ProgramShaderCache::Init()
|
||||
// We multiply by *4*4 because we need to get down to basic machine units.
|
||||
// So multiply by four to get how many floats we have from vec4s
|
||||
// Then once more to get bytes
|
||||
s_buffer = StreamBuffer::Create(GL_UNIFORM_BUFFER, UBO_LENGTH);
|
||||
s_buffer = StreamBuffer::Create(GL_UNIFORM_BUFFER, VertexManagerBase::UNIFORM_STREAM_BUFFER_SIZE);
|
||||
|
||||
CreateHeader();
|
||||
CreateAttributelessVAO();
|
||||
|
@ -135,6 +135,8 @@ bool VideoBackend::InitializeGLExtensions(GLContext* context)
|
||||
|
||||
bool VideoBackend::FillBackendInfo()
|
||||
{
|
||||
InitBackendInfo();
|
||||
|
||||
// check for the max vertex attributes
|
||||
GLint numvertexattribs = 0;
|
||||
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &numvertexattribs);
|
||||
@ -162,10 +164,8 @@ bool VideoBackend::FillBackendInfo()
|
||||
|
||||
bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
|
||||
{
|
||||
InitializeShared();
|
||||
|
||||
std::unique_ptr<GLContext> main_gl_context =
|
||||
GLContext::Create(wsi, g_ActiveConfig.stereo_mode == StereoMode::QuadBuffer, true, false,
|
||||
GLContext::Create(wsi, g_Config.stereo_mode == StereoMode::QuadBuffer, true, false,
|
||||
Config::Get(Config::GFX_PREFER_GLES));
|
||||
if (!main_gl_context)
|
||||
return false;
|
||||
@ -173,6 +173,7 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
|
||||
if (!InitializeGLExtensions(main_gl_context.get()) || !FillBackendInfo())
|
||||
return false;
|
||||
|
||||
InitializeShared();
|
||||
g_renderer = std::make_unique<Renderer>(std::move(main_gl_context), wsi.render_surface_scale);
|
||||
ProgramShaderCache::Init();
|
||||
g_vertex_manager = std::make_unique<VertexManager>();
|
||||
|
Reference in New Issue
Block a user