Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "external/pybind11"]
path = external/pybind11
url = https://github.com/skallweitNV/pybind11.git
url = https://github.com/pybind/pybind11.git
[submodule "external/glfw"]
path = external/glfw
url = https://github.com/glfw/glfw.git
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 4.2)

cmake_policy(SET CMP0077 NEW)
cmake_policy(SET CMP0091 NEW)
Expand Down
50 changes: 47 additions & 3 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 15,
"major": 4,
"minor": 2,
"patch": 0
},
"configurePresets": [
{
"name": "base",
"description": "Base configuration inherited by all presets.",
"hidden": true,
"cacheVariables": {},
"cacheVariables": {
"CMAKE_POLICY_VERSION_MINIMUM": "3.5"
},
"cmakeExecutable": "${sourceDir}/tools/.packman/cmake/bin/cmake",
"binaryDir": "${sourceDir}/build/${presetName}"
},
Expand Down Expand Up @@ -63,6 +65,36 @@
"ci"
]
},
{
"name": "windows-vs2026-base",
"description": "Base Visual Studio 2026 configuration.",
"hidden": true,
"inherits": "windows-base",
"generator": "Visual Studio 18 2026",
"architecture": {
"value": "x64",
"strategy": "set"
},
"toolset": {
"value": "host=x64",
"strategy": "set"
}
},
{
"name": "windows-vs2026",
"displayName": "Windows VS2026",
"inherits": [
"windows-vs2026-base"
]
},
{
"name": "windows-vs2026-ci",
"displayName": "Windows VS2026 (CI)",
"inherits": [
"windows-vs2026-base",
"ci"
]
},
{
"name": "windows-ninja-msvc-base",
"description": "Base Ninja configuration using MSVC.",
Expand Down Expand Up @@ -166,6 +198,18 @@
}
],
"buildPresets": [
{
"name": "windows-vs2026-release",
"displayName": "Release",
"configurePreset": "windows-vs2026",
"configuration": "Release"
},
{
"name": "windows-vs2026-debug",
"displayName": "Debug",
"configurePreset": "windows-vs2026",
"configuration": "Debug"
},
{
"name": "windows-ninja-msvc-release",
"displayName": "Release",
Expand Down
2 changes: 1 addition & 1 deletion Source/Falcor/Core/API/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ Device::Device(const Desc& desc) : mDesc(desc)
// Setup debug layer.
FALCOR_GFX_CALL(gfxSetDebugCallback(&gGFXDebugCallBack));
if (mDesc.enableDebugLayer)
gfx::gfxEnableDebugLayer();
gfx::gfxEnableDebugLayer(true);

// Get list of available GPUs.
const auto gpus = getGPUs(mDesc.type);
Expand Down
14 changes: 11 additions & 3 deletions Source/Falcor/Core/API/Texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,17 @@ ref<DepthStencilView> Texture::getDSV(uint32_t mipLevel, uint32_t firstArraySlic

ref<UnorderedAccessView> Texture::getUAV(uint32_t mipLevel, uint32_t firstArraySlice, uint32_t arraySize)
{
auto createFunc = [](Texture* pTexture, uint32_t mostDetailedMip, uint32_t mipCount, uint32_t firstArraySlice, uint32_t arraySize)
{ return UnorderedAccessView::create(pTexture->getDevice().get(), pTexture, mostDetailedMip, firstArraySlice, arraySize); };

auto createFunc =
[mipLevel](Texture* pTexture, uint32_t mostDetailedMip, uint32_t mipCount, uint32_t firstArraySlice, uint32_t arraySize)
{
auto& size = pTexture->getGfxTextureResource()->getDesc()->size;
gfx::ITextureResource::Extents origSize = size;
size.depth = size.depth >> mipLevel;
size.depth = size.depth < 1 ? 1 : size.depth;
auto view = UnorderedAccessView::create(pTexture->getDevice().get(), pTexture, mostDetailedMip, firstArraySlice, arraySize);
size = origSize;
return view;
};
return findViewCommon<UnorderedAccessView>(this, mipLevel, 1, firstArraySlice, arraySize, mUavs, createFunc);
}

Expand Down
32 changes: 1 addition & 31 deletions Source/Falcor/Core/Program/ProgramReflection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,6 @@ struct ExtendedReflectionPath : ReflectionPath
primaryLinkStorage.pParent = pPrimary;
primaryLinkStorage.pVar = pVar;
pPrimary = &primaryLinkStorage;

if (auto pDeferredVar = pVar->getPendingDataLayout())
{
deferredLinkStorage.pParent = pDeferred;
deferredLinkStorage.pVar = pDeferredVar;
pDeferred = &deferredLinkStorage;
}
}
}

Expand Down Expand Up @@ -956,29 +949,6 @@ ref<ReflectionType> reflectInterfaceType(

bindingInfo.flavor = ParameterBlockReflection::ResourceRangeBindingInfo::Flavor::Interface;

if (auto pSlangPendingTypeLayout = pSlangType->getPendingDataTypeLayout())
{
ReflectionPath subPath;
subPath.pPrimary = pPath->pDeferred;
subPath.pDeferred = nullptr;

auto pPendingBlock = ParameterBlockReflection::createEmpty(pProgramVersion);
auto pPendingType = reflectType(pSlangPendingTypeLayout, pPendingBlock.get(), &subPath, pProgramVersion);
pPendingBlock->setElementType(pPendingType);

// TODO: What to do if `pPendingType->getByteSize()` is non-zero?

pPendingBlock->finalize();

pType->setParameterBlockReflector(pPendingBlock);

bindingInfo.pSubObjectReflector = pPendingBlock;

category = slang::ParameterCategory::Uniform;
bindingInfo.regIndex = (uint32_t)getRegisterIndexFromPath(pPath->pDeferred, SlangParameterCategory(category));
bindingInfo.regSpace = getRegisterSpaceFromPath(pPath->pPrimary, SlangParameterCategory(category));
}

if (pBlock)
{
pBlock->addResourceRange(bindingInfo);
Expand All @@ -996,7 +966,7 @@ ref<ReflectionType> reflectSpecializedType(
{
auto pSlangBaseType = pSlangType->getElementTypeLayout();

auto pSlangVarLayout = pSlangType->getSpecializedTypePendingDataVarLayout();
auto pSlangVarLayout = pSlangType->getElementVarLayout();

ReflectionPathLink deferredLink;
deferredLink.pParent = pPath->pPrimary;
Expand Down
3 changes: 2 additions & 1 deletion Source/Falcor/Core/SampleApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ void SampleApp::handleKeyboardEvent(const KeyboardEvent& keyEvent)
switch (keyEvent.key)
{
case Input::Key::F12:
case Input::Key::PrintScreen:
mCaptureScreen = true;
break;
#if FALCOR_ENABLE_PROFILER
Expand Down Expand Up @@ -352,7 +353,7 @@ std::string SampleApp::getKeyboardShortcutsStr()
"F2 - Show/hide UI\n"
"F3 - Capture current camera location\n"
"F5 - Reload shaders\n"
"F12 - Capture screenshot\n"
"F12/PrintScreen - Capture screenshot\n"
"V - Toggle VSync\n"
"Pause|Space - Pause/resume the global timer\n"
"Ctrl+Pause|Space - Pause/resume the renderer\n"
Expand Down
2 changes: 1 addition & 1 deletion Source/Falcor/Utils/UI/TextRenderer.3d.slang
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void vsMain(float2 posS: POSITION, inout float2 texC: TEXCOORD, out float4 posSV

float4 calcColor(float2 texC)
{
float4 color = gFontTex.Load(int3(texC, 0));
float4 color = gFontTex.Load(int3(int2(texC), 0));
color.rgb = gFontColor;
return color;
}
Expand Down
8 changes: 5 additions & 3 deletions dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
<dependency name="tools_python" linkPath="tools/.packman/python">
<package name="python" version="3.10.11+nv1-${platform}" platforms="windows-x86_64 linux-x86_64" />
</dependency>
<remote name="cmake-github" type="https" packageLocation="github.com/Kitware/CMake/releases/download/v${version}/cmake-${version}-${platform}.zip"/>
<dependency name="tools_cmake" linkPath="tools/.packman/cmake">
<package name="cmake" version="3.24.1+nv3-${platform}" platforms="windows-x86_64 linux-x86_64" />
<package name="cmake" remotes="cmake-github" version="4.2.2" platforms="windows-x86_64 linux-x86_64" />
</dependency>
<dependency name="tools_ninja" linkPath="tools/.packman/ninja">
<package name="ninja" version="1.10.2+pipeline2996563-${platform}" platforms="windows-x86_64 linux-x86_64" />
</dependency>
<remote name="clang-format-microsoft" type="https" packageLocation="github.com/tqfx/clang-format/releases/download/microsoft%2Fv${version}/windows-x64.7z"/>
<dependency name="tools_clang-format" linkPath="tools/.packman/clang-format">
<package name="clang-format" version="15.0.6-windows-x86_64" platforms="windows-x86_64"/>
<package name="clang-format" remotes="clang-format-microsoft" version="19.1.7" platforms="windows-x86_64"/>
</dependency>
<!-- Media -->
<dependency name="media" linkPath="media">
Expand All @@ -22,7 +24,7 @@
</dependency>
<remote name="github-slang" type="https" packageLocation="github.com/shader-slang/slang/releases/download/v${version}/slang-${version}-${platform}.zip"/>
<dependency name="slang" linkPath="external/packman/slang">
<package name="slang" version="2024.1.34" remotes="github-slang" platforms="windows-x86_64 linux-x86_64"/>
<package name="slang" version="2026.1" remotes="github-slang" platforms="windows-x86_64 linux-x86_64"/>
</dependency>
<dependency name="pix" linkPath="external/packman/pix">
<package name="WinPixEventRuntime" version="1.0.190604001" platforms="windows-x86_64" />
Expand Down
36 changes: 36 additions & 0 deletions setup_vs2026.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
: This script sets up a Visual Studio 2022 solution.

@echo off
setlocal

set PRESET_SUFFIX=""

if "%~1"=="ci" (
set PRESET_SUFFIX="-ci"
)

: Fetch dependencies.
call %~dp0\setup.bat

: Configuration.
set PRESET=windows-vs2026%PRESET_SUFFIX%
set TOOLSET=host=x64
set CMAKE_EXE=%~dp0\tools\.packman\cmake\bin\cmake.exe
set CUSTOM_CUDA_DIR=%~dp0\external\packman\cuda

: Check if custom CUDA directory contains a valid CUDA SDK.
: Adjust toolset string to use the custom CUDA toolkit.
if exist %CUSTOM_CUDA_DIR%\bin\nvcc.exe (
set TOOLSET=%TOOLSET%,cuda="%CUSTOM_CUDA_DIR%"
)

: Configure solution by running cmake.
echo Configuring Visual Studio solution ...
%CMAKE_EXE% --preset %PRESET% -T %TOOLSET%
if errorlevel 1 (
echo Failed to configure solution!
exit /b 1
)

: Success.
exit /b 0
41 changes: 32 additions & 9 deletions tools/packman/bootstrap/configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
:: See the License for the specific language governing permissions and
:: limitations under the License.

set PM_PACKMAN_VERSION=7.23.2
set PM_PACKMAN_VERSION=7.34

:: Specify where packman command is rooted
set PM_INSTALL_PATH=%~dp0..
Expand All @@ -22,7 +22,7 @@ if defined PM_PACKAGES_ROOT goto ENSURE_DIR

:: If the folder isn't set we assume that the best place for it is on the drive that we are currently
:: running from
set PM_DRIVE=%CD:~0,2%
set PM_DRIVE=%PM_INSTALL_PATH:~0,2%

set PM_PACKAGES_ROOT=%PM_DRIVE%\packman-repo

Expand Down Expand Up @@ -59,7 +59,7 @@ if defined PM_PYTHON_EXT (
goto PACKMAN
)

set PM_PYTHON_VERSION=3.10.5-1-windows-x86_64
set PM_PYTHON_VERSION=3.10.19-nv2-windows-x86_64
set PM_PYTHON_BASE_DIR=%PM_PACKAGES_ROOT%\python
set PM_PYTHON_DIR=%PM_PYTHON_BASE_DIR%\%PM_PYTHON_VERSION%
set PM_PYTHON=%PM_PYTHON_DIR%\python.exe
Expand Down Expand Up @@ -91,8 +91,15 @@ if %errorlevel% neq 0 (
if exist "%PM_PYTHON%" (
call :CLEAN_UP_TEMP_FOLDER
goto PACKMAN
) else (
if exist "%PM_PYTHON_DIR%" ( rd /s /q "%PM_PYTHON_DIR%" > nul )
)

:: Clean out broken PM_PYTHON_DIR if it exists
if exist "%PM_PYTHON_DIR%" (
call :REMOVE_DIR "%PM_PYTHON_DIR%"
if errorlevel 1 (
call :CLEAN_UP_TEMP_FOLDER
goto ERROR
)
)

:: Perform atomic move (allowing overwrite, /y)
Expand Down Expand Up @@ -122,7 +129,10 @@ set PM_MODULE=%PM_MODULE_DIR%\run.py
if exist "%PM_MODULE%" goto END

:: Clean out broken PM_MODULE_DIR if it exists
if exist "%PM_MODULE_DIR%" ( rd /s /q "%PM_MODULE_DIR%" > nul )
if exist "%PM_MODULE_DIR%" (
call :REMOVE_DIR "%PM_MODULE_DIR%"
if errorlevel 1 goto :ERROR
)

set PM_MODULE_PACKAGE=packman-common@%PM_PACKMAN_VERSION%.zip
for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_file_name.ps1"') do set TEMP_FILE_NAME=%%a
Expand Down Expand Up @@ -153,13 +163,26 @@ echo.
echo Then launch a new command console for the changes to take effect and run packman command again.
exit /B %errorlevel%

:REMOVE_DIR
rd /s /q "%~1" > nul
if exist "%~1" (
echo !!! Error removing corrupt directory %~1 !!!
echo !!! Please remove this path manually !!!
exit /B 1
)
exit /B 0

:ERROR
echo !!! Failure while configuring local machine :( !!!
exit /B %errorlevel%
exit /B 1

:CLEAN_UP_TEMP_FOLDER
rd /S /Q "%TEMP_FOLDER_NAME%"
exit /B
rd /S /Q "%TEMP_FOLDER_NAME%" > nul
if exist "%TEMP_FOLDER_NAME%" (
echo !!! Error removing temporary directory %TEMP_FOLDER_NAME% !!!
exit /B 1
)
exit /B 0

:CREATE_PYTHON_BASE_DIR
:: We ignore errors and clean error state - if two processes create the directory one will fail which is fine
Expand Down
Loading