2014-05-12 3 views
0

DirectX 11 API를 사용하여 지연 렌더러를 개발 중이며 렌더링 대상에서 혼합 상태를 변경해야합니다. DX11 API는 이제 D3D_FEATURE_LEVEL_10_0에서 내 DX11 카드를 사용 8.D3D_FEATURE_LEVEL_10_0에서 D3D11_BLEND_DESC의 IndependentBlendEnable을 안전하게 사용할 수 있습니까?

typedef struct D3D11_BLEND_DESC { 
    BOOL       AlphaToCoverageEnable; 
    BOOL       IndependentBlendEnable; 
    D3D11_RENDER_TARGET_BLEND_DESC RenderTarget[8]; 
} D3D11_BLEND_DESC; 

typedef struct D3D11_RENDER_TARGET_BLEND_DESC { 
    BOOL   BlendEnable; 
    D3D11_BLEND SrcBlend; 
    D3D11_BLEND DestBlend; 
    D3D11_BLEND_OP BlendOp; 
    D3D11_BLEND SrcBlendAlpha; 
    D3D11_BLEND DestBlendAlpha; 
    D3D11_BLEND_OP BlendOpAlpha; 
    UINT8   RenderTargetWriteMask; 
} D3D11_RENDER_TARGET_BLEND_DESC; 

, 내가 오류를 얻을하지 않습니다 지정할 수있는 유연성을 가지고있는 반면

typedef struct D3D10_BLEND_DESC { 
    BOOL   AlphaToCoverageEnable; 
    BOOL   BlendEnable[8]; 
    D3D10_BLEND SrcBlend; 
    D3D10_BLEND DestBlend; 
    D3D10_BLEND_OP BlendOp; 
    D3D10_BLEND SrcBlendAlpha; 
    D3D10_BLEND DestBlendAlpha; 
    D3D10_BLEND_OP BlendOpAlpha; 
    UINT8   RenderTargetWriteMask[8]; 
} D3D10_BLEND_DESC; 

: DX10.0은 혼합 작전의 한 세트를 허용 또는 IndependentBlendEnable이 true 인 상태를 만들고 설정하는 경고. 이 결과를 DX10.0 하드웨어에서 어떤 일이 일어날지를 대표하는 것으로 신뢰할 수 있습니까? 아니면 대략적인 가이드 만 기능 수준을 확인하고 있습니까?

답변

0

DX10.0 하드웨어에서 오류가 발생합니다. 내 테스트는 RenderTarget [] 배열에 다양성이 없었으므로 DX는 IndependentBlendEnable의 값이 아무런 차이가없고 무시한다는 것을 발견했습니다. 경고를받은 것은 도움이되었지만 출력이 없었기 때문에 독립 블렌딩이 하드웨어가 아닌 소프트웨어로 해결되고 있다고 의심하게되었습니다. 어쨌든, RenderTarget [] 데이터를 변경할 때 아래 오류가 발생하고 모든 경우에이 메시지가 불편할 수 있습니다.

D3D11 ERROR: ID3D11Device::CreateBlendState: SrcBlend[ 4 ] does not equal SrcBlend[ 0 ] 
and D3D10.1 hardware is not supported. When GetFeatureLevel returns 
D3D_FEATURE_LEVEL_10_0 or less, any enabled render target blending must use the same 
blending configuration. [ STATE_CREATION ERROR #212: CREATEBLENDSTATE_INVALIDSRCBLEND] 
관련 문제