Skip to content

Commit

Permalink
Use typeless textures and linear light chroma
Browse files Browse the repository at this point in the history
  • Loading branch information
ns6089 committed Sep 29, 2023
1 parent cf093be commit 223e407
Show file tree
Hide file tree
Showing 8 changed files with 253 additions and 130 deletions.
1 change: 1 addition & 0 deletions cmake/compile_definitions/windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ set(PLATFORM_TARGET_FILES
src/platform/windows/display_base.cpp
src/platform/windows/display_vram.cpp
src/platform/windows/display_ram.cpp
src/platform/windows/dx_helpers.cpp
src/platform/windows/audio.cpp
third-party/ViGEmClient/src/ViGEmClient.cpp
third-party/ViGEmClient/include/ViGEm/Client.h
Expand Down
13 changes: 8 additions & 5 deletions src/platform/windows/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include <dxgi.h>
#include <dxgi1_6.h>

#include <comdef.h>

#include "src/platform/common.h"
#include "src/utility.h"
#include "src/video.h"
Expand All @@ -28,6 +30,10 @@ namespace platf::dxgi {
dxgi->Release();
}

_COM_SMARTPTR_TYPEDEF(ID3DBlob, IID_ID3DBlob);
_COM_SMARTPTR_TYPEDEF(ID3D11VertexShader, IID_ID3D11VertexShader);
_COM_SMARTPTR_TYPEDEF(ID3D11PixelShader, IID_ID3D11PixelShader);

using factory1_t = util::safe_ptr<IDXGIFactory1, Release<IDXGIFactory1>>;
using dxgi_t = util::safe_ptr<IDXGIDevice, Release<IDXGIDevice>>;
using dxgi1_t = util::safe_ptr<IDXGIDevice1, Release<IDXGIDevice1>>;
Expand All @@ -45,16 +51,13 @@ namespace platf::dxgi {
using resource_t = util::safe_ptr<IDXGIResource, Release<IDXGIResource>>;
using resource1_t = util::safe_ptr<IDXGIResource1, Release<IDXGIResource1>>;
using multithread_t = util::safe_ptr<ID3D11Multithread, Release<ID3D11Multithread>>;
using vs_t = util::safe_ptr<ID3D11VertexShader, Release<ID3D11VertexShader>>;
using ps_t = util::safe_ptr<ID3D11PixelShader, Release<ID3D11PixelShader>>;
using blend_t = util::safe_ptr<ID3D11BlendState, Release<ID3D11BlendState>>;
using input_layout_t = util::safe_ptr<ID3D11InputLayout, Release<ID3D11InputLayout>>;
using render_target_t = util::safe_ptr<ID3D11RenderTargetView, Release<ID3D11RenderTargetView>>;
using shader_res_t = util::safe_ptr<ID3D11ShaderResourceView, Release<ID3D11ShaderResourceView>>;
using buf_t = util::safe_ptr<ID3D11Buffer, Release<ID3D11Buffer>>;
using raster_state_t = util::safe_ptr<ID3D11RasterizerState, Release<ID3D11RasterizerState>>;
using sampler_state_t = util::safe_ptr<ID3D11SamplerState, Release<ID3D11SamplerState>>;
using blob_t = util::safe_ptr<ID3DBlob, Release<ID3DBlob>>;
using depth_stencil_state_t = util::safe_ptr<ID3D11DepthStencilState, Release<ID3D11DepthStencilState>>;
using depth_stencil_view_t = util::safe_ptr<ID3D11DepthStencilView, Release<ID3D11DepthStencilView>>;
using keyed_mutex_t = util::safe_ptr<IDXGIKeyedMutex, Release<IDXGIKeyedMutex>>;
Expand Down Expand Up @@ -329,8 +332,8 @@ namespace platf::dxgi {
blend_t blend_invert;
blend_t blend_disable;

ps_t cursor_ps;
vs_t cursor_vs;
ID3D11VertexShaderPtr cursor_vs;
ID3D11PixelShaderPtr cursor_ps;

gpu_cursor_t cursor_alpha;
gpu_cursor_t cursor_xor;
Expand Down
Loading

0 comments on commit 223e407

Please sign in to comment.