Skip to content

Commit 5b955b7

Browse files
Apply pre-commit auto-fixes
1 parent 19b527c commit 5b955b7

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

src/CodeGen_D3D12Compute_Dev.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
#include <sstream>
44
#include <utility>
55

6+
#include "CSE.h"
67
#include "CanonicalizeGPUVars.h"
78
#include "CodeGen_D3D12Compute_Dev.h"
89
#include "CodeGen_GPU_Dev.h"
910
#include "CodeGen_Internal.h"
10-
#include "CSE.h"
1111
#include "Debug.h"
1212
#include "DeviceArgument.h"
1313
#include "EliminateBoolVectors.h"

src/runtime/d3d12compute.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ struct d3d12_buffer {
555555

556556
halide_type_t halide_type;
557557

558-
UINT textureDims; // 1, 2, or 3 (only valid when type == Texture)
558+
UINT textureDims; // 1, 2, or 3 (only valid when type == Texture)
559559
UINT textureWidth;
560560
UINT textureHeight;
561561
UINT textureDepth;
@@ -2012,8 +2012,8 @@ WEAK bool D3D12LoadDXC(void *uc) {
20122012

20132013
// DXC-based shader compilation path for Shader Model 6.x.
20142014
WEAK d3d12_function *d3d12_compile_shader_dxc(d3d12_device *device, d3d12_library *library, const char *name,
2015-
int shared_mem_bytes, int threadsX, int threadsY, int threadsZ,
2016-
int sm_version) {
2015+
int shared_mem_bytes, int threadsX, int threadsY, int threadsZ,
2016+
int sm_version) {
20172017
TRACELOG;
20182018

20192019
if (!D3D12LoadDXC(user_context)) {
@@ -2045,7 +2045,7 @@ WEAK d3d12_function *d3d12_compile_shader_dxc(d3d12_device *device, d3d12_librar
20452045

20462046
// Target profile: "cs_6_X" where X = sm_version % 10
20472047
WCHAR target_profile[16] = {(WCHAR)'c', (WCHAR)'s', (WCHAR)'_', (WCHAR)'6', (WCHAR)'_',
2048-
(WCHAR)('0' + (sm_version % 10)), 0};
2048+
(WCHAR)('0' + (sm_version % 10)), 0};
20492049

20502050
// Build argument array
20512051
LPCWSTR args[24];
@@ -3087,7 +3087,7 @@ WEAK int halide_d3d12compute_image_device_malloc(void *user_context, halide_buff
30873087

30883088
UINT width = (UINT)buf->dim[0].extent;
30893089
UINT height = (dims >= 2) ? (UINT)buf->dim[1].extent : 1;
3090-
UINT depth = (dims >= 3) ? (UINT)buf->dim[2].extent : 1;
3090+
UINT depth = (dims >= 3) ? (UINT)buf->dim[2].extent : 1;
30913091

30923092
D3D12ContextHolder d3d12_context(user_context, true);
30933093
if (d3d12_context.error()) {
@@ -3302,7 +3302,8 @@ WEAK int halide_d3d12compute_image_copy_to_device(void *user_context, halide_buf
33023302
UINT src_row_bytes = tex_buf->textureWidth * elem_bytes;
33033303
// D3D12 requires staging buffer rows to be aligned to 256 bytes.
33043304
UINT row_pitch = ((src_row_bytes + D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1) /
3305-
D3D12_TEXTURE_DATA_PITCH_ALIGNMENT) * D3D12_TEXTURE_DATA_PITCH_ALIGNMENT;
3305+
D3D12_TEXTURE_DATA_PITCH_ALIGNMENT) *
3306+
D3D12_TEXTURE_DATA_PITCH_ALIGNMENT;
33063307
size_t staging_size = (size_t)row_pitch * tex_buf->textureHeight * tex_buf->textureDepth;
33073308

33083309
size_t staging_byte_offset = suballocate(d3d12_context.device, &upload, staging_size);
@@ -3382,7 +3383,8 @@ WEAK int halide_d3d12compute_image_copy_to_host(void *user_context, halide_buffe
33823383
UINT src_row_bytes = tex_buf->textureWidth * elem_bytes;
33833384
// D3D12 requires staging buffer rows to be aligned to 256 bytes.
33843385
UINT row_pitch = ((src_row_bytes + D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1) /
3385-
D3D12_TEXTURE_DATA_PITCH_ALIGNMENT) * D3D12_TEXTURE_DATA_PITCH_ALIGNMENT;
3386+
D3D12_TEXTURE_DATA_PITCH_ALIGNMENT) *
3387+
D3D12_TEXTURE_DATA_PITCH_ALIGNMENT;
33863388
size_t staging_size = (size_t)row_pitch * tex_buf->textureHeight * tex_buf->textureDepth;
33873389

33883390
size_t staging_byte_offset = suballocate(d3d12_context.device, &readback, staging_size);

src/runtime/mini_dxc.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ struct IDxcBlob {
119119
MIDL_INTERFACE("7241D424-2646-4191-97C0-98E96E42FC68")
120120
IDxcBlobEncoding : public IDxcBlob {
121121
public:
122-
virtual HRESULT STDMETHODCALLTYPE GetEncoding(_Out_ BOOL *pKnown, _Out_ UINT32 *pCodePage) = 0;
122+
virtual HRESULT STDMETHODCALLTYPE GetEncoding(_Out_ BOOL * pKnown, _Out_ UINT32 * pCodePage) = 0;
123123
};
124124

125125
#else /* C style */
@@ -198,9 +198,9 @@ struct IDxcBlobUtf8 {
198198
MIDL_INTERFACE("58346CDA-DDE7-4497-9461-6F87AF5E0659")
199199
IDxcResult : public IUnknown {
200200
public:
201-
virtual HRESULT STDMETHODCALLTYPE GetStatus(_Out_ HRESULT *pStatus) = 0;
202-
virtual HRESULT STDMETHODCALLTYPE GetResult(_COM_Outptr_ IDxcBlob **ppResult) = 0;
203-
virtual HRESULT STDMETHODCALLTYPE GetErrorBuffer(_COM_Outptr_ IDxcBlobEncoding **ppErrors) = 0;
201+
virtual HRESULT STDMETHODCALLTYPE GetStatus(_Out_ HRESULT * pStatus) = 0;
202+
virtual HRESULT STDMETHODCALLTYPE GetResult(_COM_Outptr_ IDxcBlob * *ppResult) = 0;
203+
virtual HRESULT STDMETHODCALLTYPE GetErrorBuffer(_COM_Outptr_ IDxcBlobEncoding * *ppErrors) = 0;
204204
};
205205

206206
#else /* C style */
@@ -240,7 +240,7 @@ IDxcIncludeHandler : public IUnknown {
240240
public:
241241
virtual HRESULT STDMETHODCALLTYPE LoadSource(
242242
_In_z_ LPCWSTR pFilename,
243-
_COM_Outptr_result_maybenull_ IDxcBlob **ppIncludeSource) = 0;
243+
_COM_Outptr_result_maybenull_ IDxcBlob * *ppIncludeSource) = 0;
244244
};
245245

246246
#else /* C style */
@@ -296,9 +296,9 @@ typedef struct IDxcCompiler3Vtbl {
296296
REFIID riid,
297297
_COM_Outptr_ LPVOID *ppResult);
298298
HRESULT(STDMETHODCALLTYPE *Disassemble)(IDxcCompiler3 *This,
299-
_In_ const DxcBuffer *pObject,
300-
REFIID riid,
301-
_COM_Outptr_ LPVOID *ppResult);
299+
_In_ const DxcBuffer *pObject,
300+
REFIID riid,
301+
_COM_Outptr_ LPVOID *ppResult);
302302
END_INTERFACE
303303
} IDxcCompiler3Vtbl;
304304

0 commit comments

Comments
 (0)