fix: accept integrated GPUs in physical device selection#9
Open
DasPauluteli wants to merge 1 commit into
Open
Conversation
The suitability check in findPhysicalDevice() already validates all required capabilities (VK_KHR_ray_tracing_pipeline + acceleration structure + synchronization2 + bufferDeviceAddress). The additional hard-coded filter for VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU silently rejects APUs and integrated GPUs that fully support ray tracing, producing the "[PhysicalDevice] No suitable physical device found!" crash at startup. Remove the device-type filter so that selection is capability-based. Fixes Radiance#214, Radiance#240. Also likely fixes Radiance#87 (Intel Arc 140T reports as INTEGRATED_GPU and crashes the same way). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced May 11, 2026
Open
Silent crash on startup with Radiance 0.1.2-preview on Intel Arc 140T
Minecraft-Radiance/Radiance#87
Open
Collaborator
|
I think there is a selection mechanism in the dev branch for version 0.1.3-alpha, but at the time it is not really working on a intel integrated GPU that has ray tracing unit. If it is working on a amd integrated gpu, could you also share the performance on this device? |
PEQHUB
referenced
this pull request
in PEQHUB/MCVR
Jun 9, 2026
The final sprint of the day. Brings up real ray tracing against real
chunk geometry: per-chunk BLAS builds, full TLAS rebuild from BLAS
instances, an MVP shader trio, and a RayTracingAdapter::execute that
actually calls vkCmdTraceRaysKHR.
Acceleration structure services:
* blas_service: per-chunk bottom-level AS via
vkCmdBuildAccelerationStructuresKHR. Shared 32 MB scratch buffer
(no per-chunk allocation thrash). Post-build barrier
AS_BUILD_WRITE -> RT_SHADER_READ. Old BLAS released synchronously
on chunk re-upload (deferred-delete is risk #1 for follow-up).
No compaction yet (risk #3); ALLOW_COMPACTION_BIT not set.
* tlas_service: full-rebuild TLAS from BLAS instance list. Builds two
parallel BDA SSBOs alongside the TLAS so the closest-hit shader can
fetch vertex/index buffers via gl_InstanceCustomIndexEXT. Chunk-origin
SSBO is currently zero-filled - TODO at tlas_service.cpp:73 to thread
GpuChunkData.origin through BlasData (risk #4).
Ray tracing adapter execute side:
* raytracing_adapter.cpp: full implementation.
- init: loads v2_world.{rgen,rmiss,rchit}, builds RT pipeline via
vk2::RtPipeline + ShaderBindingTable.
- registerPass: declares output (RT_HDR_OUTPUT, rgba16f), no inputs.
- execute (per frame):
1. Allocate 4 descriptor sets via vk2::DescriptorAllocator
2. Write set 0 (TLAS), set 1 (vertex/index BDA SSBOs from TLAS),
set 2 (WorldUBO + SkyUBO from SceneResourceService),
set 3 (output storage image)
3. vkCmdBindPipeline + vkCmdBindDescriptorSets x4
4. vkCmdTraceRaysKHR(cmd, rgen, miss, hit, callable, w, h, 1)
- Per-frame full descriptor allocation costs scale with bindless slot
count - risk #9 for the 4096-texture case.
MVP shader trio (v2_min/):
* v2_world.rgen (94 lines): reads camera from WorldUBO, generates primary
rays through pixel center, calls traceRayEXT, writes rgba16f.
* v2_world.rmiss (31 lines): sky gradient from SkyUBO.horizonColor ->
SkyUBO.baseColor + simple sun-disc dot-product against SkyUBO.sunDir.
* v2_world.rchit (86 lines): gl_InstanceCustomIndexEXT -> per-instance
BDA SSBO -> uvec3 indices -> 3 PBRTriangle vertices -> barycentric
interpolation -> face normal -> Lambertian shading against sun
direction. No PBR/shadows/GI yet - those come with PR39+.
Closes PR33 (BLAS), PR34 (TLAS), PR35 (RT pipeline init), PR36 (first rays).
This is the buildable checkpoint - core.dll @ MCVR/bin/core.dll built
cleanly at 23:53:49 on 2026-04-06 from the working tree at this commit.
Remaining tactical work (per FUTURE-INSPECT.md follow-ups):
PR37 - denoiser (SVGF / TAA)
PR39 - real material shading (replaces v2_min Lambertian)
PR40 - DLSS-RR upscaler integration
PR41 - NRD denoiser integration
PR42 - Frame Gen integration
PR43 - V2 config snapshot wiring
PR44 - legacy renderer removal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
findPhysicalDevice()insrc/core/vulkan/physical_device.cpphas a hard-coded filter that rejects any device that is notVK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU:This silently discards APUs and integrated GPUs that fully satisfy every actual capability requirement, causing an immediate crash on startup:
This affects at least:
rayTracingPipeline = true, still rejectedINTEGRATED_GPU)Fix
Remove the device-type filter.
isDeviceSuitable()already checks every capability that actually matters:VK_KHR_swapchain✓VK_KHR_ray_tracing_pipeline✓accelerationStructure✓synchronization2✓bufferDeviceAddress✓Selection is now purely capability-based.
Tested on
VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPUAll RT extensions confirmed present:
VK_KHR_acceleration_structure,VK_KHR_ray_tracing_pipeline,VK_KHR_ray_query.Diff