Games for Windows and the DirectX SDK blog

Technical tips, tricks, and news about game development for Microsoft platforms including desktop, Xbox, and UWP


Project maintained by walbourn Hosted on GitHub Pages — Theme by mattgraham
Home | Posts by Tag | Posts by Month

June 2010 HLSL Compiler Issue with Tessellation

direct3d, directx, hlsl

Originally posted to Chuck Walbourn's Blog on MSDN,

One of our areas of focus for the DirectX SDK (June 2010) release was to make sure our samples supported Direct3D 11 hardware from NVIDIA, as we had previously only had AMD/ATI Direct3D 11 hardware to work with. There were a few issues that arose right around the release with the SubD11 and PNTriangles11 samples. At the time we thought it was related to the driver, but in fact it turned out to be due to tessellation shader related optimization issues in the June 2010 version of the HLSL complier.

A work-around is available and is described in the Microsoft Knowledge Base article #2448404.

//---------------------------------------------------------------------------
// File: SubD11.hlsl
//
// This file contains functions to convert from a Catmull-Clark subdivision
// representation to a bicubic patch representation.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//---------------------------------------------------------------------------

//Work-around for an optimization rule problem in the June 2010 HLSL Compiler
// (9.29.952.3111)
// see http://support.microsoft.com/kb/2448404
#if D3DX_VERSION == 0xa2b
#pragma ruledisable 0x0802405f
#endif
//---------------------------------------------------------------------------
// File: PNTriangles11.hlsl
//
// These shaders implement the PN-Triangles tessellation technique
//
// Contributed by the AMD Developer Relations Team
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//---------------------------------------------------------------------------

#include "AdaptiveTessellation.hlsl"

//Work-around for an optimization rule problem in the June 2010 HLSL Compiler
// (9.29.952.3111)
// see http://support.microsoft.com/kb/2448404
#if D3DX_VERSION == 0xa2b
#pragma ruledisable 0x0802405f
#endif

HLSLWithWorkaround.zip