MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.43k stars 312 forks source link

RPRMakie Hybrid backend not functioning correctly on Nvidia GPU #3015

Open asinghvi17 opened 1 year ago

asinghvi17 commented 1 year ago

I just tried out RPRMakie from #2801 on a friend's machine, which has a Nvidia 3080 Ti. The Northstar backend works no problem, but the Hybrid backend doesn't get past initializing a screen. Here's the code to reproduce:

using RPRMakie
RPRMakie.activate!(plugin = RPR.Hybrid, resources = RPR.RPR_CREATION_FLAGS_ENABLE_GPU0)
RPRMakie.Screen((1500, 1000))

and the error is:

Program "compute_ibl_brdf_lut.comp" compilation time: 51 ms
[ Info: releasing old context
Unsupported node type: PostEffect
ERROR: Error code returned: RPR_ERROR_INVALID_PARAMETER
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:35
 [2] check_error
   @ c:\Users\Michael\Desktop\Programs\AnshulShinanegans\dev\RadeonProRender\src\LibRPR.jl:10 [inlined]
 [3] rprContextCreatePostEffect
   @ c:\Users\Michael\Desktop\Programs\AnshulShinanegans\dev\RadeonProRender\src\LibRPR.jl:4468 [inlined]
 [4] PostEffect
   @ c:\Users\Michael\Desktop\Programs\AnshulShinanegans\dev\RadeonProRender\src\highlevel-api.jl:121 [inlined]
 [5] set_standard_tonemapping!(context::RadeonProRender.Context; typ::RadeonProRender.RPR.rpr_tonemapping_operator, photolinear_sensitivity::Float32, photolinear_exposure::Float32, 
photolinear_fstop::Float32, reinhard02_prescale::Float32, reinhard02_postscale::Float32, reinhard02_burn::Float32, linear_scale::Float32, aacellsize::Float64, imagefilter_type::RadeonProRender.RPR.rpr_aa_filter, aasamples::Float64)
   @ RadeonProRender c:\Users\Michael\Desktop\Programs\AnshulShinanegans\dev\RadeonProRender\src\highlevel-api.jl:792
 [6] set_standard_tonemapping!
   @ c:\Users\Michael\Desktop\Programs\AnshulShinanegans\dev\RadeonProRender\src\highlevel-api.jl:784 [inlined]
 [7] RPRMakie.Screen(fb_size::Tuple{Int64, Int64}, config::RPRMakie.ScreenConfig)
   @ RPRMakie c:\Users\Michael\Desktop\Programs\AnshulShinanegans\dev\Makie\RPRMakie\src\scene.jl:171
 [8] RPRMakie.Screen(fb_size::Tuple{Int64, Int64}; screen_config::Base.Pairs{Symbol, RadeonProRender.RPR.rpr_creation_flags_t, Tuple{Symbol}, NamedTuple{(:resource,), Tuple{RadeonProRender.RPR.rpr_creation_flags_t}}})
   @ RPRMakie c:\Users\Michael\Desktop\Programs\AnshulShinanegans\dev\Makie\RPRMakie\src\scene.jl:151

Seems like we're using a PostEffect when setting the tone mapping, which RPR disagrees with. Will try to remove that and see what happens...

asinghvi17 commented 1 year ago

Got this running without errors by commenting set_standard_tonemapping! out. Unfortunately, that results in a screen which is only noise - even when I comment out the iteration setting code which was causing errors with Hybrid. Attempts to interactively change materials cause RPR_ERROR_UNSUPPORTED errors to be thrown.