CREATESAMPLERSTATE_BORDER_NOT_SUPPORTED

Started by
1 comment, last by 21st Century Moose 10 years, 6 months ago

When running some D3D11 code on a virtual machine I get the following error:

D3D11 ERROR: ID3D11Device::CreateSamplerState: CreateSampler: Border addressing mode not supported at this feature level. [ STATE_CREATION ERROR #1048635: CREATESAMPLERSTATE_BORDER_NOT_SUPPORTED]

Using CLAMP mode instead of BORDER makes the application work, but I was a bit confused when seeing that BORDER is not always a supported feature. I can't see anything about border in the following Direct3D feature level chart:

http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876%28v=vs.85%29.aspx#Overview

I wasn't requesting any particular feature level (passing pFeatureLevels=NULL to D3D11CreateDevice) so I can't tell what "this" is referring to in the above error message.

Is missing border mode addressing something that one should worry about or is it just an anomaly of the virtual machine?

Advertisement

Border sampling wasn't always available on DX9-level GPU's, so it's probably not available for the 9-level feature levels. Since you're running in a virtual machine it probably only supports a low feature level like 9_1 or 9_2, which is why you're running into this problem.

When you specify pFeatureLevels=NULL to D3D11CreateDevice, it will create the device using the highest feature level available. Since you're running in a virtual machine, it probably only supports a 9-level feature set. Border sampling wasn't always available for DX9 GPU's, so it doesn't surprise me that it wouldn't be included as part of the 9-level feature levels. You can easily find out the feature level of the created device by calling GetFeatureLevel after the device has been created.

The documentation for "10Level9 ID3D11Device Methods" suggests that border colour is supposed to be supported for all feature levels, but for the 9_* levels the colour should be restricted to a 0 to 1 range. Which is odd because D3D11_SAMPLER_DESC documents the same restriction but makes no mention of feature levels, thus suggesting that the restriction is irrespective of which feature level you get.

My best guess is that this one has fallen victim to the nosedive in quality of the D3D documentation that happened around 11, and that MJP has nailed it.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement