libobs-d3d11: Don't inline rebuild funcs
Inlining these functions is pretty pointless.
This commit is contained in:
parent
6378a77a82
commit
e09c63914e
@ -17,14 +17,14 @@
|
||||
|
||||
#include "d3d11-subsystem.hpp"
|
||||
|
||||
inline void gs_vertex_buffer::Rebuild()
|
||||
void gs_vertex_buffer::Rebuild()
|
||||
{
|
||||
uvBuffers.clear();
|
||||
uvSizes.clear();
|
||||
BuildBuffers();
|
||||
}
|
||||
|
||||
inline void gs_index_buffer::Rebuild(ID3D11Device *dev)
|
||||
void gs_index_buffer::Rebuild(ID3D11Device *dev)
|
||||
{
|
||||
HRESULT hr = dev->CreateBuffer(&bd, &srd, &indexBuffer);
|
||||
if (FAILED(hr))
|
||||
@ -55,7 +55,7 @@ void gs_texture_2d::RebuildSharedTextureFallback()
|
||||
isShared = false;
|
||||
}
|
||||
|
||||
inline void gs_texture_2d::Rebuild(ID3D11Device *dev)
|
||||
void gs_texture_2d::Rebuild(ID3D11Device *dev)
|
||||
{
|
||||
HRESULT hr;
|
||||
if (isShared) {
|
||||
@ -91,7 +91,7 @@ inline void gs_texture_2d::Rebuild(ID3D11Device *dev)
|
||||
}
|
||||
}
|
||||
|
||||
inline void gs_zstencil_buffer::Rebuild(ID3D11Device *dev)
|
||||
void gs_zstencil_buffer::Rebuild(ID3D11Device *dev)
|
||||
{
|
||||
HRESULT hr;
|
||||
hr = dev->CreateTexture2D(&td, nullptr, &texture);
|
||||
@ -103,21 +103,21 @@ inline void gs_zstencil_buffer::Rebuild(ID3D11Device *dev)
|
||||
throw HRError("Failed to create depth stencil view", hr);
|
||||
}
|
||||
|
||||
inline void gs_stage_surface::Rebuild(ID3D11Device *dev)
|
||||
void gs_stage_surface::Rebuild(ID3D11Device *dev)
|
||||
{
|
||||
HRESULT hr = dev->CreateTexture2D(&td, nullptr, &texture);
|
||||
if (FAILED(hr))
|
||||
throw HRError("Failed to create staging surface", hr);
|
||||
}
|
||||
|
||||
inline void gs_sampler_state::Rebuild(ID3D11Device *dev)
|
||||
void gs_sampler_state::Rebuild(ID3D11Device *dev)
|
||||
{
|
||||
HRESULT hr = dev->CreateSamplerState(&sd, state.Assign());
|
||||
if (FAILED(hr))
|
||||
throw HRError("Failed to create sampler state", hr);
|
||||
}
|
||||
|
||||
inline void gs_vertex_shader::Rebuild(ID3D11Device *dev)
|
||||
void gs_vertex_shader::Rebuild(ID3D11Device *dev)
|
||||
{
|
||||
HRESULT hr;
|
||||
hr = dev->CreateVertexShader(data.data(), data.size(), nullptr, &shader);
|
||||
@ -142,7 +142,7 @@ inline void gs_vertex_shader::Rebuild(ID3D11Device *dev)
|
||||
}
|
||||
}
|
||||
|
||||
inline void gs_pixel_shader::Rebuild(ID3D11Device *dev)
|
||||
void gs_pixel_shader::Rebuild(ID3D11Device *dev)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
@ -164,7 +164,7 @@ inline void gs_pixel_shader::Rebuild(ID3D11Device *dev)
|
||||
}
|
||||
}
|
||||
|
||||
inline void gs_swap_chain::Rebuild(ID3D11Device *dev)
|
||||
void gs_swap_chain::Rebuild(ID3D11Device *dev)
|
||||
{
|
||||
HRESULT hr = device->factory->CreateSwapChain(dev, &swapDesc, &swap);
|
||||
if (FAILED(hr))
|
||||
@ -172,21 +172,21 @@ inline void gs_swap_chain::Rebuild(ID3D11Device *dev)
|
||||
Init();
|
||||
}
|
||||
|
||||
inline void SavedBlendState::Rebuild(ID3D11Device *dev)
|
||||
void SavedBlendState::Rebuild(ID3D11Device *dev)
|
||||
{
|
||||
HRESULT hr = dev->CreateBlendState(&bd, &state);
|
||||
if (FAILED(hr))
|
||||
throw HRError("Failed to create blend state", hr);
|
||||
}
|
||||
|
||||
inline void SavedZStencilState::Rebuild(ID3D11Device *dev)
|
||||
void SavedZStencilState::Rebuild(ID3D11Device *dev)
|
||||
{
|
||||
HRESULT hr = dev->CreateDepthStencilState(&dsd, &state);
|
||||
if (FAILED(hr))
|
||||
throw HRError("Failed to create depth stencil state", hr);
|
||||
}
|
||||
|
||||
inline void SavedRasterState::Rebuild(ID3D11Device *dev)
|
||||
void SavedRasterState::Rebuild(ID3D11Device *dev)
|
||||
{
|
||||
HRESULT hr = dev->CreateRasterizerState(&rd, &state);
|
||||
if (FAILED(hr))
|
||||
|
@ -269,7 +269,7 @@ struct gs_vertex_buffer : gs_obj {
|
||||
uvBuffers.clear();
|
||||
}
|
||||
|
||||
inline void Rebuild();
|
||||
void Rebuild();
|
||||
|
||||
gs_vertex_buffer(gs_device_t *device, struct gs_vb_data *data,
|
||||
uint32_t flags);
|
||||
@ -296,7 +296,7 @@ struct gs_index_buffer : gs_obj {
|
||||
|
||||
void InitBuffer();
|
||||
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline void Release() {indexBuffer.Release();}
|
||||
|
||||
@ -312,7 +312,7 @@ struct gs_texture : gs_obj {
|
||||
ComPtr<ID3D11ShaderResourceView> shaderRes;
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC resourceDesc = {};
|
||||
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline gs_texture(gs_texture_type type, uint32_t levels,
|
||||
gs_color_format format)
|
||||
@ -370,7 +370,7 @@ struct gs_texture_2d : gs_texture {
|
||||
void BackupTexture(const uint8_t **data);
|
||||
|
||||
void RebuildSharedTextureFallback();
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline void Release()
|
||||
{
|
||||
@ -410,7 +410,7 @@ struct gs_zstencil_buffer : gs_obj {
|
||||
|
||||
void InitBuffer();
|
||||
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline void Release()
|
||||
{
|
||||
@ -437,7 +437,7 @@ struct gs_stage_surface : gs_obj {
|
||||
gs_color_format format;
|
||||
DXGI_FORMAT dxgiFormat;
|
||||
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline void Release()
|
||||
{
|
||||
@ -454,7 +454,7 @@ struct gs_sampler_state : gs_obj {
|
||||
D3D11_SAMPLER_DESC sd = {};
|
||||
gs_sampler_info info;
|
||||
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline void Release() {state.Release();}
|
||||
|
||||
@ -543,7 +543,7 @@ struct gs_vertex_shader : gs_shader {
|
||||
bool hasTangents;
|
||||
uint32_t nTexUnits;
|
||||
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline void Release()
|
||||
{
|
||||
@ -590,7 +590,7 @@ struct gs_pixel_shader : gs_shader {
|
||||
ComPtr<ID3D11PixelShader> shader;
|
||||
vector<unique_ptr<ShaderSampler>> samplers;
|
||||
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline void Release()
|
||||
{
|
||||
@ -626,7 +626,7 @@ struct gs_swap_chain : gs_obj {
|
||||
void Resize(uint32_t cx, uint32_t cy);
|
||||
void Init();
|
||||
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline void Release()
|
||||
{
|
||||
@ -673,7 +673,7 @@ struct SavedBlendState : BlendState {
|
||||
ComPtr<ID3D11BlendState> state;
|
||||
D3D11_BLEND_DESC bd;
|
||||
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline void Release()
|
||||
{
|
||||
@ -730,7 +730,7 @@ struct SavedZStencilState : ZStencilState {
|
||||
ComPtr<ID3D11DepthStencilState> state;
|
||||
D3D11_DEPTH_STENCIL_DESC dsd;
|
||||
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline void Release()
|
||||
{
|
||||
@ -765,7 +765,7 @@ struct SavedRasterState : RasterState {
|
||||
ComPtr<ID3D11RasterizerState> state;
|
||||
D3D11_RASTERIZER_DESC rd;
|
||||
|
||||
inline void Rebuild(ID3D11Device *dev);
|
||||
void Rebuild(ID3D11Device *dev);
|
||||
|
||||
inline void Release()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user