Skip to content

Commit 857ff9f

Browse files
Merge branch 'docking' into docking-vk-fix
2 parents 101f534 + 2a08c87 commit 857ff9f

File tree

67 files changed

+497
-548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+497
-548
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
VS_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\
2929
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\
3030
steps:
31-
- uses: actions/checkout@v5
31+
- uses: actions/checkout@v6
3232
with:
3333
path: ${{ github.workspace }}/imgui
3434

@@ -274,7 +274,7 @@ jobs:
274274
working-directory: ${{ github.workspace }}/imgui
275275

276276
steps:
277-
- uses: actions/checkout@v5
277+
- uses: actions/checkout@v6
278278
with:
279279
path: ${{ github.workspace }}/imgui
280280

@@ -514,7 +514,7 @@ jobs:
514514
working-directory: ${{ github.workspace }}/imgui
515515

516516
steps:
517-
- uses: actions/checkout@v5
517+
- uses: actions/checkout@v6
518518
with:
519519
path: ${{ github.workspace }}/imgui
520520

@@ -596,7 +596,7 @@ jobs:
596596
name: Build - iOS
597597

598598
steps:
599-
- uses: actions/checkout@v5
599+
- uses: actions/checkout@v6
600600

601601
- name: Build example_apple_metal
602602
run: |
@@ -608,7 +608,7 @@ jobs:
608608
name: Build - Emscripten
609609

610610
steps:
611-
- uses: actions/checkout@v5
611+
- uses: actions/checkout@v6
612612

613613
- name: Install Dependencies
614614
run: |
@@ -651,7 +651,7 @@ jobs:
651651
name: Build - Android
652652

653653
steps:
654-
- uses: actions/checkout@v5
654+
- uses: actions/checkout@v6
655655

656656
- name: Build example_android_opengl3
657657
run: |
@@ -670,11 +670,11 @@ jobs:
670670
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\
671671

672672
steps:
673-
- uses: actions/checkout@v5
673+
- uses: actions/checkout@v6
674674
with:
675675
path: ${{ github.workspace }}/imgui
676676

677-
- uses: actions/checkout@v5
677+
- uses: actions/checkout@v6
678678
continue-on-error: true
679679
with:
680680
fetch-depth: 1
@@ -725,11 +725,11 @@ jobs:
725725
working-directory: ${{ github.workspace }}/imgui
726726

727727
steps:
728-
- uses: actions/checkout@v5
728+
- uses: actions/checkout@v6
729729
with:
730730
path: ${{ github.workspace }}/imgui
731731

732-
- uses: actions/checkout@v5
732+
- uses: actions/checkout@v6
733733
with:
734734
fetch-depth: 1
735735
repository: ocornut/imgui_test_engine
@@ -763,11 +763,11 @@ jobs:
763763
# working-directory: ${{ github.workspace }}/imgui
764764
#
765765
# steps:
766-
# - uses: actions/checkout@v5
766+
# - uses: actions/checkout@v6
767767
# with:
768768
# path: ${{ github.workspace }}/imgui
769769
#
770-
# - uses: actions/checkout@v5
770+
# - uses: actions/checkout@v6
771771
# with:
772772
# fetch-depth: 1
773773
# repository: ocornut/imgui_test_engine

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
PVS-Studio:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616
with:
1717
fetch-depth: 1
1818

backends/imgui_impl_allegro5.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ void ImGui_ImplAllegro5_SetDisplay(ALLEGRO_DISPLAY* display)
525525
if (bd->VertexDecl)
526526
{
527527
al_destroy_vertex_decl(bd->VertexDecl);
528-
bd->VertexDecl = NULL;
528+
bd->VertexDecl = nullptr;
529529
}
530530

531531
if (bd->Display && !bd->VertexDecl)

backends/imgui_impl_allegro5.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ IMGUI_IMPL_API void ImGui_ImplAllegro5_SetDisplay(ALLEGRO_DISPLAY* display);
3939
IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects();
4040
IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects();
4141

42-
// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
42+
// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = nullptr to handle this manually.
4343
IMGUI_IMPL_API void ImGui_ImplAllegro5_UpdateTexture(ImTextureData* tex);
4444

4545
#endif // #ifndef IMGUI_DISABLE

backends/imgui_impl_dx10.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
// CHANGELOG
1919
// (minor and older changes stripped away, please see git history for details)
20-
// 2025-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
20+
// 2026-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
21+
// 2026-01-19: DirectX11: Added 'SamplerNearest' in ImGui_ImplDX11_RenderState. Renamed 'SamplerDefault' to 'SamplerLinear'.
2122
// 2025-09-18: Call platform_io.ClearRendererHandlers() on shutdown.
2223
// 2025-06-11: DirectX10: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas.
2324
// 2025-05-07: DirectX10: Honor draw_data->FramebufferScale to allow for custom backends and experiment using it (consistently with other renderer backends, even though in normal condition it is not set under Windows).
@@ -77,6 +78,7 @@ struct ImGui_ImplDX10_Data
7778
ID3D10Buffer* pVertexConstantBuffer;
7879
ID3D10PixelShader* pPixelShader;
7980
ID3D10SamplerState* pTexSamplerLinear;
81+
ID3D10SamplerState* pTexSamplerNearest;
8082
ID3D10RasterizerState* pRasterizerState;
8183
ID3D10BlendState* pBlendState;
8284
ID3D10DepthStencilState* pDepthStencilState;
@@ -264,7 +266,8 @@ void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data)
264266
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
265267
ImGui_ImplDX10_RenderState render_state;
266268
render_state.Device = bd->pd3dDevice;
267-
render_state.SamplerDefault = bd->pTexSamplerLinear;
269+
render_state.SamplerLinear = bd->pTexSamplerLinear;
270+
render_state.SamplerNearest = bd->pTexSamplerNearest;
268271
render_state.VertexConstantBuffer = bd->pVertexConstantBuffer;
269272
platform_io.Renderer_RenderState = &render_state;
270273

@@ -571,6 +574,8 @@ bool ImGui_ImplDX10_CreateDeviceObjects()
571574
desc.MinLOD = 0.f;
572575
desc.MaxLOD = 0.f;
573576
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pTexSamplerLinear);
577+
desc.Filter = D3D10_FILTER_MIN_MAG_MIP_POINT;
578+
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pTexSamplerNearest);
574579
}
575580

576581
return true;
@@ -587,6 +592,7 @@ void ImGui_ImplDX10_InvalidateDeviceObjects()
587592
if (tex->RefCount == 1)
588593
ImGui_ImplDX10_DestroyTexture(tex);
589594
if (bd->pTexSamplerLinear) { bd->pTexSamplerLinear->Release(); bd->pTexSamplerLinear = nullptr; }
595+
if (bd->pTexSamplerNearest) { bd->pTexSamplerNearest->Release(); bd->pTexSamplerNearest = nullptr; }
590596
if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
591597
if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
592598
if (bd->pBlendState) { bd->pBlendState->Release(); bd->pBlendState = nullptr; }

backends/imgui_impl_dx10.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ IMGUI_IMPL_API void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data);
3333
IMGUI_IMPL_API bool ImGui_ImplDX10_CreateDeviceObjects();
3434
IMGUI_IMPL_API void ImGui_ImplDX10_InvalidateDeviceObjects();
3535

36-
// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
36+
// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = nullptr to handle this manually.
3737
IMGUI_IMPL_API void ImGui_ImplDX10_UpdateTexture(ImTextureData* tex);
3838

3939
// [BETA] Selected render state data shared with callbacks.
@@ -42,7 +42,8 @@ IMGUI_IMPL_API void ImGui_ImplDX10_UpdateTexture(ImTextureData* tex);
4242
struct ImGui_ImplDX10_RenderState
4343
{
4444
ID3D10Device* Device;
45-
ID3D10SamplerState* SamplerDefault;
45+
ID3D10SamplerState* SamplerLinear;
46+
ID3D10SamplerState* SamplerNearest;
4647
ID3D10Buffer* VertexConstantBuffer;
4748
};
4849

backends/imgui_impl_dx11.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
// CHANGELOG
2020
// (minor and older changes stripped away, please see git history for details)
21-
// 2025-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
21+
// 2026-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
22+
// 2026-01-19: DirectX11: Added 'SamplerNearest' in ImGui_ImplDX11_RenderState. Renamed 'SamplerDefault' to 'SamplerLinear'.
2223
// 2025-09-18: Call platform_io.ClearRendererHandlers() on shutdown.
2324
// 2025-06-11: DirectX11: Added support for ImGuiBackendFlags_RendererHasTextures, for dynamic font atlas.
2425
// 2025-05-07: DirectX11: Honor draw_data->FramebufferScale to allow for custom backends and experiment using it (consistently with other renderer backends, even though in normal condition it is not set under Windows).
@@ -81,6 +82,7 @@ struct ImGui_ImplDX11_Data
8182
ID3D11Buffer* pVertexConstantBuffer;
8283
ID3D11PixelShader* pPixelShader;
8384
ID3D11SamplerState* pTexSamplerLinear;
85+
ID3D11SamplerState* pTexSamplerNearest;
8486
ID3D11RasterizerState* pRasterizerState;
8587
ID3D11BlendState* pBlendState;
8688
ID3D11DepthStencilState* pDepthStencilState;
@@ -280,7 +282,8 @@ void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data)
280282
ImGui_ImplDX11_RenderState render_state;
281283
render_state.Device = bd->pd3dDevice;
282284
render_state.DeviceContext = bd->pd3dDeviceContext;
283-
render_state.SamplerDefault = bd->pTexSamplerLinear;
285+
render_state.SamplerLinear = bd->pTexSamplerLinear;
286+
render_state.SamplerNearest = bd->pTexSamplerNearest;
284287
render_state.VertexConstantBuffer = bd->pVertexConstantBuffer;
285288
platform_io.Renderer_RenderState = &render_state;
286289

@@ -588,6 +591,8 @@ bool ImGui_ImplDX11_CreateDeviceObjects()
588591
desc.MinLOD = 0.f;
589592
desc.MaxLOD = 0.f;
590593
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pTexSamplerLinear);
594+
desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
595+
bd->pd3dDevice->CreateSamplerState(&desc, &bd->pTexSamplerNearest);
591596
}
592597

593598
return true;
@@ -605,6 +610,7 @@ void ImGui_ImplDX11_InvalidateDeviceObjects()
605610
ImGui_ImplDX11_DestroyTexture(tex);
606611

607612
if (bd->pTexSamplerLinear) { bd->pTexSamplerLinear->Release(); bd->pTexSamplerLinear = nullptr; }
613+
if (bd->pTexSamplerNearest) { bd->pTexSamplerNearest->Release(); bd->pTexSamplerNearest = nullptr; }
608614
if (bd->pIB) { bd->pIB->Release(); bd->pIB = nullptr; }
609615
if (bd->pVB) { bd->pVB->Release(); bd->pVB = nullptr; }
610616
if (bd->pBlendState) { bd->pBlendState->Release(); bd->pBlendState = nullptr; }

backends/imgui_impl_dx11.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ IMGUI_IMPL_API void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data);
3535
IMGUI_IMPL_API bool ImGui_ImplDX11_CreateDeviceObjects();
3636
IMGUI_IMPL_API void ImGui_ImplDX11_InvalidateDeviceObjects();
3737

38-
// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
38+
// (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = nullptr to handle this manually.
3939
IMGUI_IMPL_API void ImGui_ImplDX11_UpdateTexture(ImTextureData* tex);
4040

4141
// [BETA] Selected render state data shared with callbacks.
@@ -45,7 +45,8 @@ struct ImGui_ImplDX11_RenderState
4545
{
4646
ID3D11Device* Device;
4747
ID3D11DeviceContext* DeviceContext;
48-
ID3D11SamplerState* SamplerDefault;
48+
ID3D11SamplerState* SamplerLinear;
49+
ID3D11SamplerState* SamplerNearest;
4950
ID3D11Buffer* VertexConstantBuffer;
5051
};
5152

backends/imgui_impl_dx12.cpp

Lines changed: 53 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
// CHANGELOG
2424
// (minor and older changes stripped away, please see git history for details)
25-
// 2025-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
25+
// 2026-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
2626
// 2025-10-23: [Docking] DirectX12: Fixed an issue in synchronization logic improving rendering throughput for secondary viewports. (#8961, #9025)
2727
// 2025-10-11: DirectX12: Reuse texture upload buffer and grow it only when necessary. (#9002)
2828
// 2025-09-29: DirectX12: Rework synchronization logic. (#8961)
@@ -97,8 +97,10 @@ struct ImGui_ImplDX12_Data
9797
ImGui_ImplDX12_InitInfo InitInfo;
9898
IDXGIFactory5* pdxgiFactory;
9999
ID3D12Device* pd3dDevice;
100-
ID3D12RootSignature* pRootSignature;
101-
ID3D12PipelineState* pPipelineState;
100+
ID3D12RootSignature* pRootSignatureLinear;
101+
ID3D12RootSignature* pRootSignatureNearest;
102+
ID3D12PipelineState* pPipelineStateLinear;
103+
ID3D12PipelineState* pPipelineStateNearest;
102104
ID3D12CommandQueue* pCommandQueue;
103105
bool commandQueueOwned;
104106
DXGI_FORMAT RTVFormat;
@@ -215,11 +217,27 @@ struct VERTEX_CONSTANT_BUFFER_DX12
215217
static void ImGui_ImplDX12_InitMultiViewportSupport();
216218
static void ImGui_ImplDX12_ShutdownMultiViewportSupport();
217219

220+
// FIXME-WIP: Allow user to forward declare those two, for until we come up with a backend agnostic API to do this. (#9173)
221+
void ImGui_ImplDX12_SetupSamplerLinear(ID3D12GraphicsCommandList* command_list);
222+
void ImGui_ImplDX12_SetupSamplerNearest(ID3D12GraphicsCommandList* command_list);
223+
218224
// Functions
219-
static void ImGui_ImplDX12_SetupRenderState(ImDrawData* draw_data, ID3D12GraphicsCommandList* command_list, ImGui_ImplDX12_RenderBuffers* fr)
225+
void ImGui_ImplDX12_SetupSamplerLinear(ID3D12GraphicsCommandList* command_list)
220226
{
221227
ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
228+
command_list->SetPipelineState(bd->pPipelineStateLinear);
229+
command_list->SetGraphicsRootSignature(bd->pRootSignatureLinear);
230+
}
222231

232+
void ImGui_ImplDX12_SetupSamplerNearest(ID3D12GraphicsCommandList* command_list)
233+
{
234+
ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
235+
command_list->SetPipelineState(bd->pPipelineStateNearest);
236+
command_list->SetGraphicsRootSignature(bd->pRootSignatureNearest);
237+
}
238+
239+
static void ImGui_ImplDX12_SetupRenderState(ImDrawData* draw_data, ID3D12GraphicsCommandList* command_list, ImGui_ImplDX12_RenderBuffers* fr)
240+
{
223241
// Setup orthographic projection matrix into our constant buffer
224242
// Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right).
225243
VERTEX_CONSTANT_BUFFER_DX12 vertex_constant_buffer;
@@ -261,8 +279,7 @@ static void ImGui_ImplDX12_SetupRenderState(ImDrawData* draw_data, ID3D12Graphic
261279
ibv.Format = sizeof(ImDrawIdx) == 2 ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT;
262280
command_list->IASetIndexBuffer(&ibv);
263281
command_list->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
264-
command_list->SetPipelineState(bd->pPipelineState);
265-
command_list->SetGraphicsRootSignature(bd->pRootSignature);
282+
ImGui_ImplDX12_SetupSamplerLinear(command_list);
266283
command_list->SetGraphicsRoot32BitConstants(0, 16, &vertex_constant_buffer, 0);
267284

268285
// Setup blend factor
@@ -631,7 +648,7 @@ bool ImGui_ImplDX12_CreateDeviceObjects()
631648
ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
632649
if (!bd || !bd->pd3dDevice)
633650
return false;
634-
if (bd->pPipelineState)
651+
if (bd->pPipelineStateLinear)
635652
ImGui_ImplDX12_InvalidateDeviceObjects();
636653

637654
HRESULT hr = ::CreateDXGIFactory1(IID_PPV_ARGS(&bd->pdxgiFactory));
@@ -720,7 +737,15 @@ bool ImGui_ImplDX12_CreateDeviceObjects()
720737
if (D3D12SerializeRootSignatureFn(&desc, D3D_ROOT_SIGNATURE_VERSION_1, &blob, nullptr) != S_OK)
721738
return false;
722739

723-
bd->pd3dDevice->CreateRootSignature(0, blob->GetBufferPointer(), blob->GetBufferSize(), IID_PPV_ARGS(&bd->pRootSignature));
740+
bd->pd3dDevice->CreateRootSignature(0, blob->GetBufferPointer(), blob->GetBufferSize(), IID_PPV_ARGS(&bd->pRootSignatureLinear));
741+
blob->Release();
742+
743+
// Root Signature for ImDrawCallback_SetSamplerNearest
744+
staticSampler[0].Filter = D3D12_FILTER_MIN_MAG_MIP_POINT;
745+
if (D3D12SerializeRootSignatureFn(&desc, D3D_ROOT_SIGNATURE_VERSION_1, &blob, nullptr) != S_OK)
746+
return false;
747+
748+
bd->pd3dDevice->CreateRootSignature(0, blob->GetBufferPointer(), blob->GetBufferSize(), IID_PPV_ARGS(&bd->pRootSignatureNearest));
724749
blob->Release();
725750
}
726751

@@ -733,7 +758,7 @@ bool ImGui_ImplDX12_CreateDeviceObjects()
733758
D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
734759
psoDesc.NodeMask = 1;
735760
psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
736-
psoDesc.pRootSignature = bd->pRootSignature;
761+
psoDesc.pRootSignature = bd->pRootSignatureLinear;
737762
psoDesc.SampleMask = UINT_MAX;
738763
psoDesc.NumRenderTargets = 1;
739764
psoDesc.RTVFormats[0] = bd->RTVFormat;
@@ -856,7 +881,18 @@ bool ImGui_ImplDX12_CreateDeviceObjects()
856881
desc.BackFace = desc.FrontFace;
857882
}
858883

859-
HRESULT result_pipeline_state = bd->pd3dDevice->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&bd->pPipelineState));
884+
HRESULT result_pipeline_state = bd->pd3dDevice->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&bd->pPipelineStateLinear));
885+
if (result_pipeline_state != S_OK)
886+
{
887+
vertexShaderBlob->Release();
888+
pixelShaderBlob->Release();
889+
return false;
890+
}
891+
892+
// Pipeline State for ImDrawCallback_SetSamplerNearest
893+
psoDesc.pRootSignature = bd->pRootSignatureNearest;
894+
895+
result_pipeline_state = bd->pd3dDevice->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&bd->pPipelineStateNearest));
860896
vertexShaderBlob->Release();
861897
pixelShaderBlob->Release();
862898
if (result_pipeline_state != S_OK)
@@ -896,8 +932,11 @@ void ImGui_ImplDX12_InvalidateDeviceObjects()
896932
if (bd->commandQueueOwned)
897933
SafeRelease(bd->pCommandQueue);
898934
bd->commandQueueOwned = false;
899-
SafeRelease(bd->pRootSignature);
900-
SafeRelease(bd->pPipelineState);
935+
SafeRelease(bd->pRootSignatureLinear);
936+
SafeRelease(bd->pRootSignatureNearest);
937+
SafeRelease(bd->pPipelineStateLinear);
938+
SafeRelease(bd->pPipelineStateNearest);
939+
901940
if (bd->pTexUploadBufferMapped)
902941
{
903942
D3D12_RANGE range = { 0, bd->pTexUploadBufferSize };
@@ -951,7 +990,7 @@ bool ImGui_ImplDX12_Init(ImGui_ImplDX12_InitInfo* init_info)
951990
init_info = &bd->InitInfo;
952991

953992
bd->pd3dDevice = init_info->Device;
954-
IM_ASSERT(init_info->CommandQueue != NULL);
993+
IM_ASSERT(init_info->CommandQueue != nullptr);
955994
bd->pCommandQueue = init_info->CommandQueue;
956995
bd->RTVFormat = init_info->RTVFormat;
957996
bd->DSVFormat = init_info->DSVFormat;
@@ -1045,7 +1084,7 @@ void ImGui_ImplDX12_NewFrame()
10451084
ImGui_ImplDX12_Data* bd = ImGui_ImplDX12_GetBackendData();
10461085
IM_ASSERT(bd != nullptr && "Context or backend not initialized! Did you call ImGui_ImplDX12_Init()?");
10471086

1048-
if (!bd->pPipelineState)
1087+
if (!bd->pPipelineStateLinear)
10491088
if (!ImGui_ImplDX12_CreateDeviceObjects())
10501089
IM_ASSERT(0 && "ImGui_ImplDX12_CreateDeviceObjects() failed!");
10511090
}

0 commit comments

Comments
 (0)