| 345 | } |
| 346 | |
| 347 | inline Device::SupportedFeatures querySupportedFeatures(gfx::IDevice* pDevice) |
| 348 | { |
| 349 | Device::SupportedFeatures result = Device::SupportedFeatures::None; |
| 350 | if (pDevice->hasFeature("ray-tracing")) |
| 351 | { |
| 352 | result |= Device::SupportedFeatures::Raytracing; |
| 353 | } |
| 354 | if (pDevice->hasFeature("ray-query")) |
| 355 | { |
| 356 | result |= Device::SupportedFeatures::RaytracingTier1_1; |
| 357 | } |
| 358 | if (pDevice->hasFeature("conservative-rasterization-3")) |
| 359 | { |
| 360 | result |= Device::SupportedFeatures::ConservativeRasterizationTier3; |
| 361 | } |
| 362 | if (pDevice->hasFeature("conservative-rasterization-2")) |
| 363 | { |
| 364 | result |= Device::SupportedFeatures::ConservativeRasterizationTier2; |
| 365 | } |
| 366 | if (pDevice->hasFeature("conservative-rasterization-1")) |
| 367 | { |
| 368 | result |= Device::SupportedFeatures::ConservativeRasterizationTier1; |
| 369 | } |
| 370 | if (pDevice->hasFeature("rasterizer-ordered-views")) |
| 371 | { |
| 372 | result |= Device::SupportedFeatures::RasterizerOrderedViews; |
| 373 | } |
| 374 | |
| 375 | if (pDevice->hasFeature("programmable-sample-positions-2")) |
| 376 | { |
| 377 | result |= Device::SupportedFeatures::ProgrammableSamplePositionsFull; |
| 378 | } |
| 379 | else if (pDevice->hasFeature("programmable-sample-positions-1")) |
| 380 | { |
| 381 | result |= Device::SupportedFeatures::ProgrammableSamplePositionsPartialOnly; |
| 382 | } |
| 383 | |
| 384 | if (pDevice->hasFeature("barycentrics")) |
| 385 | { |
| 386 | result |= Device::SupportedFeatures::Barycentrics; |
| 387 | } |
| 388 | |
| 389 | if (pDevice->hasFeature("wave-ops")) |
| 390 | { |
| 391 | result |= Device::SupportedFeatures::WaveOperations; |
| 392 | } |
| 393 | |
| 394 | |
| 395 | return result; |
| 396 | } |
| 397 | |
| 398 | inline ShaderModel querySupportedShaderModel(gfx::IDevice* pDevice) |
| 399 | { |