Skip to content

Commit 441fc16

Browse files
Apply pre-commit auto-fixes
1 parent 81c4794 commit 441fc16

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

src/CodeGen_D3D12Compute_Dev.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,12 @@ void CodeGen_D3D12Compute_Dev::CodeGen_D3D12Compute_C::visit(const Store *op) {
880880
// Detect min/max/bitwise patterns by examining the expression structure.
881881
// Each has the form op(load, rhs) where rhs is independent of the buffer.
882882
auto detect_rhs = [&](const Expr &a, const Expr &b) -> Expr {
883-
if (equal(a, equiv_load) && !expr_uses_var(b, op->name)) { return b; }
884-
if (equal(b, equiv_load) && !expr_uses_var(a, op->name)) { return a; }
883+
if (equal(a, equiv_load) && !expr_uses_var(b, op->name)) {
884+
return b;
885+
}
886+
if (equal(b, equiv_load) && !expr_uses_var(a, op->name)) {
887+
return a;
888+
}
885889
return Expr();
886890
};
887891
Expr rhs;
@@ -1768,13 +1772,12 @@ void CodeGen_D3D12Compute_Dev::init_module() {
17681772
#endif
17691773
// DXC (SM 6.x) rejects FXC-specific float literals 1.#IND / 1.#INF.
17701774
// Use asfloat() with IEEE 754 bit patterns instead.
1771-
<< (sm >= 60
1772-
? "float nan_f32() { return asfloat(0x7fc00000u); } \n"
1773-
"float neg_inf_f32() { return asfloat(0xff800000u); } \n"
1774-
"float inf_f32() { return asfloat(0x7f800000u); } \n"
1775-
: "float nan_f32() { return 1.#IND; } \n"
1776-
"float neg_inf_f32() { return -1.#INF; } \n"
1777-
"float inf_f32() { return +1.#INF; } \n")
1775+
<< (sm >= 60 ? "float nan_f32() { return asfloat(0x7fc00000u); } \n"
1776+
"float neg_inf_f32() { return asfloat(0xff800000u); } \n"
1777+
"float inf_f32() { return asfloat(0x7f800000u); } \n" :
1778+
"float nan_f32() { return 1.#IND; } \n"
1779+
"float neg_inf_f32() { return -1.#INF; } \n"
1780+
"float inf_f32() { return +1.#INF; } \n")
17781781
<< "#define float_from_bits asfloat \n"
17791782
// pow() in HLSL has the same semantics as C if
17801783
// x > 0. Otherwise, we need to emulate C

src/runtime/d3d12compute.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@
7676

7777
WEAK void d3d12_debug_dump();
7878

79-
#define d3d12_panic(...) \
80-
do { \
81-
/* Print the fatal message via halide_print (non-aborting) FIRST so it \
82-
is always visible, even though d3d12_debug_dump() aborts below. */ \
79+
#define d3d12_panic(...) \
80+
do { \
81+
/* Print the fatal message via halide_print (non-aborting) FIRST so it \
82+
is always visible, even though d3d12_debug_dump() aborts below. */ \
8383
BasicPrinter<4096>(nullptr) << "D3D12 FATAL: " << __VA_ARGS__ << "\n" \
84-
<< "vvvvv D3D12 Begin Debug Dump vvvvv\n"; \
85-
d3d12_debug_dump(); /* aborts via halide_error inside */ \
84+
<< "vvvvv D3D12 Begin Debug Dump vvvvv\n"; \
85+
d3d12_debug_dump(); /* aborts via halide_error inside */ \
8686
} while (0)
8787

8888
// v trace and logging utilities for debugging v

src/runtime/mini_dxc.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,13 @@ MIDL_INTERFACE("E5204DC7-D18C-4C3C-BDFB-851673980FE7")
289289
IDxcLibrary : public IUnknown {
290290
public:
291291
virtual HRESULT STDMETHODCALLTYPE SetMalloc(void *pMalloc) = 0;
292-
virtual HRESULT STDMETHODCALLTYPE CreateBlobFromBlob(IDxcBlob *pBlob, UINT32 offset, UINT32 length,
293-
_COM_Outptr_ IDxcBlob **ppResult) = 0;
294-
virtual HRESULT STDMETHODCALLTYPE CreateBlobFromFile(LPCWSTR pFileName, UINT32 *pCodePage,
295-
_COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
292+
virtual HRESULT STDMETHODCALLTYPE CreateBlobFromBlob(IDxcBlob * pBlob, UINT32 offset, UINT32 length,
293+
_COM_Outptr_ IDxcBlob * *ppResult) = 0;
294+
virtual HRESULT STDMETHODCALLTYPE CreateBlobFromFile(LPCWSTR pFileName, UINT32 * pCodePage,
295+
_COM_Outptr_ IDxcBlobEncoding * *pBlobEncoding) = 0;
296296
virtual HRESULT STDMETHODCALLTYPE CreateBlobWithEncodingFromPinned(
297297
LPCVOID pText, UINT32 size, UINT32 codePage,
298-
_COM_Outptr_ IDxcBlobEncoding **pBlobEncoding) = 0;
298+
_COM_Outptr_ IDxcBlobEncoding * *pBlobEncoding) = 0;
299299
};
300300

301301
#endif /* C++ only — C-style vtable omitted (not used) */
@@ -311,11 +311,11 @@ MIDL_INTERFACE("8C210BF3-011F-4422-8D70-6F9ACB374E6F")
311311
IDxcCompiler : public IUnknown {
312312
public:
313313
virtual HRESULT STDMETHODCALLTYPE Compile(
314-
IDxcBlob *pSource,
314+
IDxcBlob * pSource,
315315
_In_opt_ LPCWSTR pSourceName,
316316
LPCWSTR pEntryPoint,
317317
LPCWSTR pTargetProfile,
318-
_In_opt_count_(argCount) LPCWSTR *pArguments,
318+
_In_opt_count_(argCount) LPCWSTR * pArguments,
319319
UINT32 argCount,
320320
_In_opt_ const void *pDefines,
321321
UINT32 defineCount,

0 commit comments

Comments
 (0)