mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Cleanups
This commit is contained in:
parent
b8460026fb
commit
8d7e9b31a4
@ -28,12 +28,14 @@
|
||||
|
||||
#define CINTERFACE
|
||||
#define COBJMACROS
|
||||
//#ifdef __GNUC__
|
||||
//#define WIDL_C_INLINE_WRAPPERS
|
||||
//#include <_mingw.h>
|
||||
//#undef __forceinline
|
||||
//#define __forceinline inline __attribute__((__always_inline__))
|
||||
//#endif
|
||||
#if 0
|
||||
#ifdef __GNUC__
|
||||
#define WIDL_C_INLINE_WRAPPERS
|
||||
#include <_mingw.h>
|
||||
#undef __forceinline
|
||||
#define __forceinline inline __attribute__((__always_inline__))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <d3d11.h>
|
||||
#include "dxgi_common.h"
|
||||
|
@ -177,14 +177,18 @@ bool d3d12_init_swapchain(d3d12_video_t *d3d12, int width, int height, HWND hwnd
|
||||
.BufferDesc.Height = height,
|
||||
.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM,
|
||||
.SampleDesc.Count = 1,
|
||||
// .BufferDesc.RefreshRate.Numerator = 60,
|
||||
// .BufferDesc.RefreshRate.Denominator = 1,
|
||||
// .SampleDesc.Quality = 0,
|
||||
#if 0
|
||||
.BufferDesc.RefreshRate.Numerator = 60,
|
||||
.BufferDesc.RefreshRate.Denominator = 1,
|
||||
.SampleDesc.Quality = 0,
|
||||
#endif
|
||||
.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT,
|
||||
.OutputWindow = hwnd,
|
||||
.Windowed = TRUE,
|
||||
.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL,
|
||||
// .SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD,
|
||||
#if 0
|
||||
.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD,
|
||||
#endif
|
||||
};
|
||||
DXGICreateSwapChain(d3d12->factory, d3d12->queue.handle, &desc, &d3d12->chain.handle);
|
||||
}
|
||||
@ -227,7 +231,9 @@ bool d3d12_init_descriptors(d3d12_video_t *d3d12)
|
||||
.NumDescriptors = 1,
|
||||
.BaseShaderRegister = 0,
|
||||
.RegisterSpace = 0,
|
||||
// .Flags = D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC, /* version 1_1 only */
|
||||
#if 0
|
||||
.Flags = D3D12_DESCRIPTOR_RANGE_FLAG_DATA_STATIC, /* version 1_1 only */
|
||||
#endif
|
||||
.OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND,
|
||||
},
|
||||
};
|
||||
|
@ -109,24 +109,30 @@ static void* d3d11_gfx_init(const video_info_t* video,
|
||||
.SampleDesc.Count = 1,
|
||||
.SampleDesc.Quality = 0,
|
||||
.Windowed = TRUE,
|
||||
// .SwapEffect = DXGI_SWAP_EFFECT_DISCARD,
|
||||
#if 0
|
||||
.SwapEffect = DXGI_SWAP_EFFECT_DISCARD,
|
||||
#endif
|
||||
.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL,
|
||||
// .SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL,
|
||||
// .SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD,
|
||||
#if 0
|
||||
.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL,
|
||||
.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD,
|
||||
#endif
|
||||
};
|
||||
|
||||
//#ifdef DEBUG
|
||||
/* #ifdef DEBUG */
|
||||
flags |= D3D11_CREATE_DEVICE_DEBUG;
|
||||
//#endif
|
||||
/* #endif */
|
||||
|
||||
D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, flags,
|
||||
&requested_feature_level, 1, D3D11_SDK_VERSION, &desc,
|
||||
(IDXGISwapChain**)&d3d11->swapChain, &d3d11->device, &d3d11->supportedFeatureLevel, &d3d11->context);
|
||||
}
|
||||
|
||||
// d3d = *device->lpVtbl;
|
||||
// ctx = *context->lpVtbl;
|
||||
// dxgi = *swapChain->lpVtbl;
|
||||
#if 0
|
||||
d3d = *device->lpVtbl;
|
||||
ctx = *context->lpVtbl;
|
||||
dxgi = *swapChain->lpVtbl;
|
||||
#endif
|
||||
|
||||
D3D11Texture2D backBuffer;
|
||||
DXGIGetSwapChainBufferD3D11(d3d11->swapChain, 0, &backBuffer);
|
||||
@ -148,7 +154,9 @@ static void* d3d11_gfx_init(const video_info_t* video,
|
||||
.MipLevels = 1,
|
||||
.ArraySize = 1,
|
||||
.Format = DXGI_FORMAT_B8G8R8A8_UNORM,
|
||||
// .Format = d3d11->rgb32? DXGI_FORMAT_B8G8R8X8_UNORM : DXGI_FORMAT_B5G6R5_UNORM,
|
||||
#if 0
|
||||
.Format = d3d11->rgb32? DXGI_FORMAT_B8G8R8X8_UNORM : DXGI_FORMAT_B5G6R5_UNORM,
|
||||
#endif
|
||||
.SampleDesc.Count = 1,
|
||||
.SampleDesc.Quality = 0,
|
||||
.Usage = D3D11_USAGE_DEFAULT,
|
||||
|
@ -175,7 +175,9 @@ static bool d3d12_gfx_frame(void *data, const void *frame,
|
||||
{
|
||||
if(d3d12->menu.tex.dirty)
|
||||
d3d12_upload_texture(d3d12->queue.cmd, &d3d12->menu.tex);
|
||||
// D3D12IASetVertexBuffers(d3d12->queue.cmd, 0, 1, &d3d12->frame.vbo_view);
|
||||
#if 0
|
||||
D3D12IASetVertexBuffers(d3d12->queue.cmd, 0, 1, &d3d12->frame.vbo_view);
|
||||
#endif
|
||||
D3D12SetGraphicsRootDescriptorTable(d3d12->queue.cmd, 0,
|
||||
d3d12->menu.tex.gpu_descriptor); /* set texture */
|
||||
D3D12DrawInstanced(d3d12->queue.cmd, 4, 1, 0, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user