microsoft / OpenCLOn12

The OpenCL-on-D3D12 mapping layer
MIT License
104 stars 13 forks source link

Inherit ShaderModel from the device, and initialize #52

Closed min-lee closed 9 months ago

min-lee commented 9 months ago

Currently config.shader_model is not initialized, or initialized to 0. This makes CLon12 choose the highest possible Shader model, currently 6.7. I encountered a case that the driver doesn't support 6.5 (only supports 6.2) so it fails to create d3d12 device. This patch fixes it by inherits shadermodel version from the device.