Skip to content

Commit 2e26388

Browse files
refac: updates for PL v0.10.0
1 parent f92453b commit 2e26388

16 files changed

Lines changed: 261 additions & 172 deletions

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: Install Dependencies
4444
run: |
45-
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.3.296.0/windows/VulkanSDK-1.3.296.0-Installer.exe" -OutFile VulkanSDK.exe
45+
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/1.4.350.0/windows/vulkansdk-windows-X64-1.4.350.0.exe" -OutFile VulkanSDK.exe
4646
# ./VulkanSDK.exe --help
4747
./VulkanSDK.exe --accept-licenses --default-answer --root D:/a/VulkanSDK --confirm-command install
4848
python -m pip install pl-build
@@ -89,9 +89,9 @@ jobs:
8989

9090
- name: Install Dependencies
9191
run: |
92-
curl https://sdk.lunarg.com/sdk/download/1.3.283.0/mac/vulkansdk-macos-1.3.283.0.dmg -o vk.dmg
93-
hdiutil attach vk.dmg
94-
sudo /Volumes/vulkansdk-macos-1.3.283.0/InstallVulkan.app/Contents/MacOS/InstallVulkan --root ~/VulkanSDK/1.3.283.0 --accept-licenses --default-answer --confirm-command install com.lunarg.vulkan.core com.lunarg.vulkan.usr com.lunarg.vulkan.sdl2 com.lunarg.vulkan.glm com.lunarg.vulkan.volk com.lunarg.vulkan.vma com.lunarg.vulkan.ios
92+
curl https://sdk.lunarg.com/sdk/download/1.4.350.0/mac/vulkansdk-macos-1.4.350.0.zip -o vk.zip
93+
unzip vk.zip
94+
sudo ./vulkansdk-macOS-1.4.350.0.app/Contents/MacOS/vulkansdk-macOS-1.4.350.0 --root ~/VulkanSDK/1.4.350.0 --accept-licenses --default-answer --confirm-command install com.lunarg.vulkan.core com.lunarg.vulkan.usr com.lunarg.vulkan.sdl2 com.lunarg.vulkan.glm com.lunarg.vulkan.volk com.lunarg.vulkan.vma com.lunarg.vulkan.ios
9595
python3 -m pip install pl-build
9696
cd ..
9797
git clone https://github.com/PilotLightTech/pilotlight

examples/example_basic_0.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def pl_app_load(self):
6565
shader_options.pcCacheOutputDirectory = "/shader-temp/"
6666
shader_options.apcDirectories = ["/shaders/"]
6767
shader_options.apcIncludeDirectories = ["/shaders/"]
68-
shader_options.tFlags = (
68+
shader_options.eFlags = (
6969
plShaderFlags.PL_SHADER_FLAGS_AUTO_OUTPUT
7070
| plShaderFlags.PL_SHADER_FLAGS_INCLUDE_DEBUG
7171
| plShaderFlags.PL_SHADER_FLAGS_ALWAYS_COMPILE

examples/example_basic_1.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def pl_app_load(self):
8787
shader_options.pcCacheOutputDirectory = "/shader-temp/"
8888
shader_options.apcDirectories = ["/shaders/"]
8989
shader_options.apcIncludeDirectories = ["/shaders/"]
90-
shader_options.tFlags = (
90+
shader_options.eFlags = (
9191
plShaderFlags.PL_SHADER_FLAGS_AUTO_OUTPUT
9292
| plShaderFlags.PL_SHADER_FLAGS_INCLUDE_DEBUG
9393
| plShaderFlags.PL_SHADER_FLAGS_ALWAYS_COMPILE
@@ -154,12 +154,14 @@ def pl_app_update(self):
154154
# text
155155
plDrawI.add_text(self.ptFGLayer, [300, 300], "Hello Python", plDrawTextOptions(self.ptFont, 18.0, PL_COLOR_32_CYAN))
156156

157-
encoder = plStarterI.begin_main_pass()
157+
cmdBuffer = plStarterI.begin_main_pass()
158158

159159
plDrawI.submit_2d_layer(self.ptFGLayer)
160160
io = plIOI.get_io()
161161
tMainViewportSize = io.tMainViewportSize
162-
plDrawI.submit_2d_drawlist(self.drawlist, encoder, tMainViewportSize.x, tMainViewportSize.y, 1)
162+
tRenderAttachmentInfo = plRenderAttachmentInfo()
163+
plStarterI.get_render_attachment_info(tRenderAttachmentInfo)
164+
plDrawI.submit_2d_drawlist(self.drawlist, cmdBuffer, tMainViewportSize.x, tMainViewportSize.y, 1, tRenderAttachmentInfo)
163165

164166
plStarterI.end_main_pass()
165167

examples/example_basic_2.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def pl_app_load(self):
9090
shader_options.pcCacheOutputDirectory = "/shader-temp/"
9191
shader_options.apcDirectories = ["/shaders/"]
9292
shader_options.apcIncludeDirectories = ["/shaders/"]
93-
shader_options.tFlags = (
93+
shader_options.eFlags = (
9494
plShaderFlags.PL_SHADER_FLAGS_AUTO_OUTPUT
9595
| plShaderFlags.PL_SHADER_FLAGS_INCLUDE_DEBUG
9696
| plShaderFlags.PL_SHADER_FLAGS_ALWAYS_COMPILE
@@ -472,22 +472,25 @@ def pl_app_update(self):
472472
self.draw_scene()
473473

474474
# Main render pass.
475-
encoder = plStarterI.begin_main_pass()
475+
cmdBuffer = plStarterI.begin_main_pass()
476476

477477
tMainViewportSize = ptIO.tMainViewportSize
478478

479479
mvp = self.camera.tProjMat * self.camera.tViewMat
480480
# mvp = self.camera.tViewProjMat
481481
# mvp = self.camera.tProjMat
482482

483+
tRenderAttachmentInfo = plRenderAttachmentInfo()
484+
plStarterI.get_render_attachment_info(tRenderAttachmentInfo)
483485
plDrawI.submit_3d_drawlist(
484486
self.drawlist,
485-
encoder,
487+
cmdBuffer,
486488
tMainViewportSize.x,
487489
tMainViewportSize.y,
488490
mvp,
489491
plDrawFlag.PL_DRAW_FLAG_DEPTH_TEST | plDrawFlag.PL_DRAW_FLAG_DEPTH_WRITE,
490-
plGraphicsI.get_swapchain_info(plStarterI.get_swapchain()).tSampleCount
492+
plGraphicsI.get_swapchain_info(plStarterI.get_swapchain()).eSampleCount,
493+
tRenderAttachmentInfo
491494
)
492495

493496
plStarterI.end_main_pass()

examples/example_basic_3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def pl_app_load(self):
4242

4343
# Create and show the OS window.
4444
window_desc = plWindowDesc()
45-
window_desc.pcTitle = "Pilot Light Python - Basic Example 0"
45+
window_desc.pcTitle = "Pilot Light Python - Basic Example 3"
4646
window_desc.iXPos = 100
4747
window_desc.iYPos = 100
4848
window_desc.uWidth = 1280
@@ -66,7 +66,7 @@ def pl_app_load(self):
6666
shader_options.pcCacheOutputDirectory = "/shader-temp/"
6767
shader_options.apcDirectories = ["/shaders/"]
6868
shader_options.apcIncludeDirectories = ["/shaders/"]
69-
shader_options.tFlags = (
69+
shader_options.eFlags = (
7070
plShaderFlags.PL_SHADER_FLAGS_AUTO_OUTPUT
7171
| plShaderFlags.PL_SHADER_FLAGS_INCLUDE_DEBUG
7272
| plShaderFlags.PL_SHADER_FLAGS_ALWAYS_COMPILE

extensions/pl_dearimgui_ext_m.cpp

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,41 @@ dear_imgui_initialize(PyObject* self, PyObject* args, PyObject* kwargs)
7676

7777
PyObject* ptPythonDevice = nullptr;
7878
PyObject* ptPythonSwapchain = nullptr;
79-
uint32_t uRenderPassHandle = 0;
79+
PyObject* ptPythonAttachmentInfo = NULL;
8080

8181
static const char* apcKeywords[] = {
8282
"device",
8383
"swapchain",
84-
"renderpass_handle",
84+
"attachmentInfo",
8585
NULL,
8686
};
8787

88-
if (!pl_parse_args("OOI", (const char**)apcKeywords, args, kwargs, __FUNCTION__,
89-
&ptPythonDevice, &ptPythonSwapchain, &uRenderPassHandle))
88+
if (!pl_parse_args("OOO", (const char**)apcKeywords, args, kwargs, __FUNCTION__,
89+
&ptPythonDevice, &ptPythonSwapchain, &ptPythonAttachmentInfo))
9090
return NULL;
9191

9292
plDevice* ptDevice = (plDevice*)PyCapsule_GetPointer(ptPythonDevice, "plDevice");
9393
plSwapchain* ptSwapchain = (plSwapchain*)PyCapsule_GetPointer(ptPythonSwapchain, "plSwapchain");
94-
plRenderPassHandle tHandle = {};
95-
tHandle.uData = uRenderPassHandle;
9694

97-
pl_dear_imgui_initialize(ptDevice, ptSwapchain, tHandle);
95+
plRenderAttachmentInfo tInfo = {0};
96+
PyObject* ptPythonAttachmentDepth = PyObject_GetAttrString(ptPythonAttachmentInfo, "eDepthFormat");
97+
PyLong_AsInt32(ptPythonAttachmentDepth, &tInfo.eDepthFormat);
98+
Py_DECREF(ptPythonAttachmentDepth);
99+
100+
ptPythonAttachmentDepth = PyObject_GetAttrString(ptPythonAttachmentInfo, "eStencilFormat");
101+
PyLong_AsInt32(ptPythonAttachmentDepth, &tInfo.eStencilFormat);
102+
Py_DECREF(ptPythonAttachmentDepth);
103+
104+
ptPythonAttachmentDepth = PyObject_GetAttrString(ptPythonAttachmentInfo, "aeColorFormats");
105+
Py_ssize_t pySize = PyList_Size(ptPythonAttachmentDepth);
106+
for (Py_ssize_t i = 0; i < pySize; ++i)
107+
{
108+
PyObject* ptColor = PyList_GetItem(ptPythonAttachmentDepth, i);
109+
PyLong_AsInt32(ptColor, &tInfo.aeColorFormats[i]);
110+
}
111+
Py_DECREF(ptPythonAttachmentDepth);
112+
113+
pl_dear_imgui_initialize(ptDevice, ptSwapchain, &tInfo);
98114

99115
// ImPlot::SetCurrentContext((ImPlotContext*)ptDataRegistry->get_data("implot"));
100116
ImGuiIO& tImGuiIO = ImGui::GetIO();
@@ -108,23 +124,19 @@ dear_imgui_new_frame(PyObject* self, PyObject* args, PyObject* kwargs)
108124
{
109125

110126
PyObject* ptPythonDevice = nullptr;
111-
uint32_t uRenderPassHandle = 0;
112127

113128
static const char* apcKeywords[] = {
114129
"device",
115-
"renderpass_handle",
116130
NULL,
117131
};
118132

119-
if (!pl_parse_args("OI", (const char**)apcKeywords, args, kwargs, __FUNCTION__,
120-
&ptPythonDevice, &uRenderPassHandle))
133+
if (!pl_parse_args("O", (const char**)apcKeywords, args, kwargs, __FUNCTION__,
134+
&ptPythonDevice))
121135
return NULL;
122136

123137
plDevice* ptDevice = (plDevice*)PyCapsule_GetPointer(ptPythonDevice, "plDevice");
124-
plRenderPassHandle tHandle = {};
125-
tHandle.uData = uRenderPassHandle;
126138

127-
pl_dear_imgui_new_frame(ptDevice, tHandle);
139+
pl_dear_imgui_new_frame(ptDevice);
128140

129141
Py_RETURN_NONE;
130142
}
@@ -160,17 +172,17 @@ dear_imgui_render(PyObject* self, PyObject* args, PyObject* kwargs)
160172
PyObject* ptPythonRenderEncoder = nullptr;
161173

162174
static const char* apcKeywords[] = {
163-
"render_encoder",
175+
"commandBuffer",
164176
NULL,
165177
};
166178

167179
if (!pl_parse_args("O", (const char**)apcKeywords, args, kwargs, __FUNCTION__,
168180
&ptPythonRenderEncoder))
169181
return NULL;
170182

171-
plRenderEncoder* ptRenderEncoder = (plRenderEncoder*)PyCapsule_GetPointer(ptPythonRenderEncoder, "plRenderEncoder");
183+
plCommandBuffer* ptCmdBuffer = (plCommandBuffer*)PyCapsule_GetPointer(ptPythonRenderEncoder, "plCommandBuffer");
172184

173-
pl_dear_imgui_render(ptRenderEncoder, gptGfx->get_encoder_command_buffer(ptRenderEncoder));
185+
pl_dear_imgui_render(ptCmdBuffer);
174186

175187
Py_RETURN_NONE;
176188
}

extensions/pl_draw_ext_m.c

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -229,23 +229,45 @@ draw_submit_2d_drawlist(PyObject* self, PyObject* args)
229229
float fWidth = 0.0f;
230230
float fHeight = 0.0f;
231231
int iSampleCount = 1;
232+
PyObject* ptPythonAttachmentInfo = NULL;
232233

233234
static const char* apcKeywords[] = {
234235
"drawlist",
235-
"encoder",
236+
"commandBuffer",
236237
"width",
237238
"height",
238239
"sampleCount",
240+
"attachmentInfo",
239241
NULL,
240242
};
241243

242-
if (!pl_parse_args("OOffi", (const char**)apcKeywords, args, NULL, __FUNCTION__,
243-
&ptPythonDrawlist, &ptPythonEncoder, &fWidth, &fHeight, &iSampleCount))
244+
if (!pl_parse_args("OOffiO", (const char**)apcKeywords, args, NULL, __FUNCTION__,
245+
&ptPythonDrawlist, &ptPythonEncoder, &fWidth, &fHeight, &iSampleCount, &ptPythonAttachmentInfo))
244246
return NULL;
245247

246248
plDrawList2D* ptDrawlist = PyCapsule_GetPointer(ptPythonDrawlist, "plDrawList2D");
247-
plRenderEncoder* ptEncoder = PyCapsule_GetPointer(ptPythonEncoder, "plRenderEncoder");
248-
gptDraw->submit_2d_drawlist(ptDrawlist, ptEncoder, fWidth, fHeight, (uint32_t)iSampleCount);
249+
plCommandBuffer* ptCmdBuffer = PyCapsule_GetPointer(ptPythonEncoder, "plCommandBuffer");
250+
251+
plRenderAttachmentInfo tInfo = {0};
252+
PyObject* ptPythonAttachmentDepth = PyObject_GetAttrString(ptPythonAttachmentInfo, "eDepthFormat");
253+
PyLong_AsInt32(ptPythonAttachmentDepth, &tInfo.eDepthFormat);
254+
Py_DECREF(ptPythonAttachmentDepth);
255+
256+
ptPythonAttachmentDepth = PyObject_GetAttrString(ptPythonAttachmentInfo, "eStencilFormat");
257+
PyLong_AsInt32(ptPythonAttachmentDepth, &tInfo.eStencilFormat);
258+
Py_DECREF(ptPythonAttachmentDepth);
259+
260+
ptPythonAttachmentDepth = PyObject_GetAttrString(ptPythonAttachmentInfo, "aeColorFormats");
261+
Py_ssize_t pySize = PyList_Size(ptPythonAttachmentDepth);
262+
for (Py_ssize_t i = 0; i < pySize; ++i)
263+
{
264+
PyObject* ptColor = PyList_GetItem(ptPythonAttachmentDepth, i);
265+
PyLong_AsInt32(ptColor, &tInfo.aeColorFormats[i]);
266+
}
267+
Py_DECREF(ptPythonAttachmentDepth);
268+
269+
270+
gptDraw->submit_2d_drawlist(ptDrawlist, ptCmdBuffer, fWidth, fHeight, (uint32_t)iSampleCount, &tInfo);
249271
Py_RETURN_NONE;
250272
}
251273

@@ -259,26 +281,49 @@ draw_submit_3d_drawlist(PyObject* self, PyObject* args)
259281
PyObject* ptPythonMVP = NULL;
260282
int iFlags = 0;
261283
int iSampleCount = 1;
284+
PyObject* ptPythonAttachmentInfo = NULL;
262285

263286
static const char* apcKeywords[] = {
264287
"drawlist",
265-
"encoder",
288+
"commandBuffer",
266289
"width",
267290
"height",
268291
"mvp",
269292
"flags",
270293
"sampleCount",
294+
"attachmentInfo",
271295
NULL,
272296
};
273297

274-
if (!pl_parse_args("OOffOii", (const char**)apcKeywords, args, NULL, __FUNCTION__,
275-
&ptPythonDrawlist, &ptPythonEncoder, &fWidth, &fHeight, &ptPythonMVP, &iFlags, &iSampleCount))
298+
if (!pl_parse_args("OOffOiiO", (const char**)apcKeywords, args, NULL, __FUNCTION__,
299+
&ptPythonDrawlist, &ptPythonEncoder, &fWidth, &fHeight, &ptPythonMVP, &iFlags, &iSampleCount, &ptPythonAttachmentInfo))
276300
return NULL;
277301

302+
303+
278304
plDrawList3D* ptDrawlist = PyCapsule_GetPointer(ptPythonDrawlist, "plDrawList3D");
279-
plRenderEncoder* ptEncoder = PyCapsule_GetPointer(ptPythonEncoder, "plRenderEncoder");
305+
plCommandBuffer* ptCmdBuffer = PyCapsule_GetPointer(ptPythonEncoder, "plCommandBuffer");
306+
307+
plRenderAttachmentInfo tInfo = {0};
308+
PyObject* ptPythonAttachmentDepth = PyObject_GetAttrString(ptPythonAttachmentInfo, "eDepthFormat");
309+
PyLong_AsInt32(ptPythonAttachmentDepth, &tInfo.eDepthFormat);
310+
Py_DECREF(ptPythonAttachmentDepth);
311+
312+
ptPythonAttachmentDepth = PyObject_GetAttrString(ptPythonAttachmentInfo, "eStencilFormat");
313+
PyLong_AsInt32(ptPythonAttachmentDepth, &tInfo.eStencilFormat);
314+
Py_DECREF(ptPythonAttachmentDepth);
315+
316+
ptPythonAttachmentDepth = PyObject_GetAttrString(ptPythonAttachmentInfo, "aeColorFormats");
317+
Py_ssize_t pySize = PyList_Size(ptPythonAttachmentDepth);
318+
for (Py_ssize_t i = 0; i < pySize; ++i)
319+
{
320+
PyObject* ptColor = PyList_GetItem(ptPythonAttachmentDepth, i);
321+
PyLong_AsInt32(ptColor, &tInfo.aeColorFormats[i]);
322+
}
323+
Py_DECREF(ptPythonAttachmentDepth);
324+
280325
pyplMat4* m = (pyplMat4*)ptPythonMVP;
281-
gptDraw->submit_3d_drawlist(ptDrawlist, ptEncoder, fWidth, fHeight, &m->m, iFlags, (uint32_t)iSampleCount);
326+
gptDraw->submit_3d_drawlist(ptDrawlist, ptCmdBuffer, fWidth, fHeight, &m->m, iFlags, (uint32_t)iSampleCount, &tInfo);
282327
Py_RETURN_NONE;
283328
}
284329

extensions/pl_shader_ext_m.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Index of this file:
2121
PyObject*
2222
shader_initialize(PyObject* self, PyObject* args)
2323
{
24-
PyObject* ptFlags = PyObject_GetAttrString(args, "tFlags");
25-
PyObject* ptOptimizationLevel = PyObject_GetAttrString(args, "tOptimizationLevel");
24+
PyObject* ptFlags = PyObject_GetAttrString(args, "eFlags");
25+
PyObject* ptOptimizationLevel = PyObject_GetAttrString(args, "eOptimizationLevel");
2626
PyObject* ptCacheOutputDirectory = PyObject_GetAttrString(args, "pcCacheOutputDirectory");
2727
PyObject* apcIncludeDirectories = PyObject_GetAttrString(args, "apcIncludeDirectories");
2828
PyObject* apcDirectories = PyObject_GetAttrString(args, "apcDirectories");
@@ -31,8 +31,8 @@ shader_initialize(PyObject* self, PyObject* args)
3131

3232
plShaderOptions tOptions = {0};
3333

34-
PyLong_AsInt32(ptFlags, &tOptions.tFlags);
35-
PyLong_AsInt32(ptOptimizationLevel, &tOptions.tOptimizationLevel);
34+
PyLong_AsInt32(ptFlags, &tOptions.eFlags);
35+
PyLong_AsInt32(ptOptimizationLevel, &tOptions.eOptimizationLevel);
3636
tOptions.pcCacheOutputDirectory = PyUnicode_AsUTF8(ptCacheOutputDirectory);
3737

3838
Py_ssize_t szIncludeCount = PyList_Size(apcIncludeDirectories);
@@ -89,15 +89,15 @@ shader_load_glsl(PyObject* self, PyObject* args, PyObject* kwargs)
8989

9090
if(ptOptions)
9191
{
92-
PyObject* ptFlags = PyObject_GetAttrString(ptOptions, "tFlags");
93-
PyObject* ptOptimizationLevel = PyObject_GetAttrString(ptOptions, "tOptimizationLevel");
92+
PyObject* ptFlags = PyObject_GetAttrString(ptOptions, "eFlags");
93+
PyObject* ptOptimizationLevel = PyObject_GetAttrString(ptOptions, "eOptimizationLevel");
9494
PyObject* ptCacheOutputDirectory = PyObject_GetAttrString(ptOptions, "pcCacheOutputDirectory");
9595
PyObject* apcIncludeDirectories = PyObject_GetAttrString(ptOptions, "apcIncludeDirectories");
9696
PyObject* apcDirectories = PyObject_GetAttrString(ptOptions, "apcDirectories");
9797
PyObject* ptMacroDefinitions = PyObject_GetAttrString(ptOptions, "ptMacroDefinitions");
9898

99-
PyLong_AsInt32(ptFlags, &tOptions.tFlags);
100-
PyLong_AsInt32(ptOptimizationLevel, &tOptions.tOptimizationLevel);
99+
PyLong_AsInt32(ptFlags, &tOptions.eFlags);
100+
PyLong_AsInt32(ptOptimizationLevel, &tOptions.eOptimizationLevel);
101101
tOptions.pcCacheOutputDirectory = PyUnicode_AsUTF8(ptCacheOutputDirectory);
102102

103103
Py_ssize_t szIncludeCount = PyList_Size(apcIncludeDirectories);
@@ -147,15 +147,15 @@ shader_compile_glsl(PyObject* self, PyObject* args, PyObject* kwargs)
147147

148148
if(ptOptions)
149149
{
150-
PyObject* ptFlags = PyObject_GetAttrString(ptOptions, "tFlags");
151-
PyObject* ptOptimizationLevel = PyObject_GetAttrString(ptOptions, "tOptimizationLevel");
150+
PyObject* ptFlags = PyObject_GetAttrString(ptOptions, "eFlags");
151+
PyObject* ptOptimizationLevel = PyObject_GetAttrString(ptOptions, "eOptimizationLevel");
152152
PyObject* ptCacheOutputDirectory = PyObject_GetAttrString(ptOptions, "pcCacheOutputDirectory");
153153
PyObject* apcIncludeDirectories = PyObject_GetAttrString(ptOptions, "apcIncludeDirectories");
154154
PyObject* apcDirectories = PyObject_GetAttrString(ptOptions, "apcDirectories");
155155
PyObject* ptMacroDefinitions = PyObject_GetAttrString(ptOptions, "ptMacroDefinitions");
156156

157-
PyLong_AsInt32(ptFlags, &tOptions.tFlags);
158-
PyLong_AsInt32(ptOptimizationLevel, &tOptions.tOptimizationLevel);
157+
PyLong_AsInt32(ptFlags, &tOptions.eFlags);
158+
PyLong_AsInt32(ptOptimizationLevel, &tOptions.eOptimizationLevel);
159159
tOptions.pcCacheOutputDirectory = PyUnicode_AsUTF8(ptCacheOutputDirectory);
160160

161161
Py_ssize_t szIncludeCount = PyList_Size(apcIncludeDirectories);

0 commit comments

Comments
 (0)