Use RenderTextureDescriptor with CreateDepthStencilBuffer
Start using HDCamera.renderTextureDesc in new RenderTexture instances. Does have support for width/height override in order to support HTile allocation.
m_CameraStencilBufferCopy=newRenderTexture(camera.pixelWidth,camera.pixelHeight,0,RenderTextureFormat.R8,RenderTextureReadWrite.Linear);// DXGI_FORMAT_R8_UINT is not supported by Unity
//m_CameraStencilBufferCopy = CreateRenderTexture(hdCamera, 0, RenderTextureFormat.R8, RenderTextureReadWrite.Linear); // DXGI_FORMAT_R8_UINT is not supported by Unity
m_CameraStencilBufferCopy=CreateRenderTexture(hdCamera,0,RenderTextureFormat.R8,RenderTextureReadWrite.Linear);// DXGI_FORMAT_R8_UINT is not supported by Unity
// We use 8x8 tiles in order to match the native GCN HTile as closely as possible.
m_HTile=newRenderTexture((camera.pixelWidth+7)/8,(camera.pixelHeight+7)/8,0,RenderTextureFormat.R8,RenderTextureReadWrite.Linear);// DXGI_FORMAT_R8_UINT is not supported by Unity
//var desc = hdCamera.renderTextureDesc;
//desc.width = (desc.width + 7) / 8;
//desc.height = (desc.height + 7) / 8;
//desc.depthBufferBits = 0;
//desc.colorFormat = RenderTextureFormat.R8;
//desc.sRGB = false;
//m_HTile = new RenderTexture((camera.pixelWidth + 7) / 8, (camera.pixelHeight + 7) / 8, 0, RenderTextureFormat.R8, RenderTextureReadWrite.Linear); // DXGI_FORMAT_R8_UINT is not supported by Unity
vardesc=hdCamera.renderTextureDesc;
m_HTile=CreateRenderTexture(hdCamera,0,RenderTextureFormat.R8,RenderTextureReadWrite.Linear,((desc.width+7)/8),((desc.height+7)/8));// DXGI_FORMAT_R8_UINT is not supported by Unity