Commit 096c5296 by Jamie Madill Committed by Commit Bot

Blit11: Refactor for error returning.

Don't use ErrorOrResult. Also pass gl::Context around to more places. Bug: angleproject:2378 Change-Id: Id498471fc9ab4f4d6b2285e110381b10a1247689 Reviewed-on: https://chromium-review.googlesource.com/1148465Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent daf2e913
...@@ -621,7 +621,7 @@ Blit11::~Blit11() ...@@ -621,7 +621,7 @@ Blit11::~Blit11()
{ {
} }
gl::Error Blit11::initResources() gl::Error Blit11::initResources(const gl::Context *context)
{ {
if (mResourcesInitialized) if (mResourcesInitialized)
{ {
...@@ -1033,7 +1033,9 @@ Blit11::SwizzleShaderType Blit11::GetSwizzleShaderType(GLenum type, ...@@ -1033,7 +1033,9 @@ Blit11::SwizzleShaderType Blit11::GetSwizzleShaderType(GLenum type,
} }
} }
gl::Error Blit11::getShaderSupport(const Shader &shader, Blit11::ShaderSupport *supportOut) gl::Error Blit11::getShaderSupport(const gl::Context *context,
const Shader &shader,
Blit11::ShaderSupport *supportOut)
{ {
if (shader.dimension == SHADER_2D) if (shader.dimension == SHADER_2D)
{ {
...@@ -1065,7 +1067,7 @@ gl::Error Blit11::swizzleTexture(const gl::Context *context, ...@@ -1065,7 +1067,7 @@ gl::Error Blit11::swizzleTexture(const gl::Context *context,
const gl::Extents &size, const gl::Extents &size,
const gl::SwizzleState &swizzleTarget) const gl::SwizzleState &swizzleTarget)
{ {
ANGLE_TRY(initResources()); ANGLE_TRY(initResources(context));
ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext(); ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext();
...@@ -1110,7 +1112,7 @@ gl::Error Blit11::swizzleTexture(const gl::Context *context, ...@@ -1110,7 +1112,7 @@ gl::Error Blit11::swizzleTexture(const gl::Context *context,
} }
const Shader *shader = nullptr; const Shader *shader = nullptr;
ANGLE_TRY(getSwizzleShader(shaderType, sourceSRVDesc.ViewDimension, &shader)); ANGLE_TRY(getSwizzleShader(context, shaderType, sourceSRVDesc.ViewDimension, &shader));
// Set vertices // Set vertices
D3D11_MAPPED_SUBRESOURCE mappedResource; D3D11_MAPPED_SUBRESOURCE mappedResource;
...@@ -1118,7 +1120,7 @@ gl::Error Blit11::swizzleTexture(const gl::Context *context, ...@@ -1118,7 +1120,7 @@ gl::Error Blit11::swizzleTexture(const gl::Context *context,
&mappedResource)); &mappedResource));
ShaderSupport support; ShaderSupport support;
ANGLE_TRY(getShaderSupport(*shader, &support)); ANGLE_TRY(getShaderSupport(context, *shader, &support));
UINT stride = 0; UINT stride = 0;
UINT drawCount = 0; UINT drawCount = 0;
...@@ -1193,7 +1195,7 @@ gl::Error Blit11::copyTexture(const gl::Context *context, ...@@ -1193,7 +1195,7 @@ gl::Error Blit11::copyTexture(const gl::Context *context,
bool unpackPremultiplyAlpha, bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha) bool unpackUnmultiplyAlpha)
{ {
ANGLE_TRY(initResources()); ANGLE_TRY(initResources(context));
ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext(); ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext();
...@@ -1212,11 +1214,11 @@ gl::Error Blit11::copyTexture(const gl::Context *context, ...@@ -1212,11 +1214,11 @@ gl::Error Blit11::copyTexture(const gl::Context *context,
(sourceSRVDesc.ViewDimension == D3D11_SRV_DIMENSION_TEXTURE3D) ? SHADER_3D : SHADER_2D; (sourceSRVDesc.ViewDimension == D3D11_SRV_DIMENSION_TEXTURE3D) ? SHADER_3D : SHADER_2D;
const Shader *shader = nullptr; const Shader *shader = nullptr;
ANGLE_TRY(getBlitShader(destFormat, sourceFormat, isSigned, unpackPremultiplyAlpha, ANGLE_TRY(getBlitShader(context, destFormat, sourceFormat, isSigned, unpackPremultiplyAlpha,
unpackUnmultiplyAlpha, destTypeForDownsampling, dimension, &shader)); unpackUnmultiplyAlpha, destTypeForDownsampling, dimension, &shader));
ShaderSupport support; ShaderSupport support;
ANGLE_TRY(getShaderSupport(*shader, &support)); ANGLE_TRY(getShaderSupport(context, *shader, &support));
// Set vertices // Set vertices
D3D11_MAPPED_SUBRESOURCE mappedResource; D3D11_MAPPED_SUBRESOURCE mappedResource;
...@@ -1304,7 +1306,7 @@ gl::Error Blit11::copyStencil(const gl::Context *context, ...@@ -1304,7 +1306,7 @@ gl::Error Blit11::copyStencil(const gl::Context *context,
const gl::Extents &destSize, const gl::Extents &destSize,
const gl::Rectangle *scissor) const gl::Rectangle *scissor)
{ {
return copyDepthStencilImpl(source, sourceSubresource, sourceArea, sourceSize, dest, return copyDepthStencilImpl(context, source, sourceSubresource, sourceArea, sourceSize, dest,
destSubresource, destArea, destSize, scissor, true); destSubresource, destArea, destSize, scissor, true);
} }
...@@ -1317,7 +1319,7 @@ gl::Error Blit11::copyDepth(const gl::Context *context, ...@@ -1317,7 +1319,7 @@ gl::Error Blit11::copyDepth(const gl::Context *context,
const gl::Extents &destSize, const gl::Extents &destSize,
const gl::Rectangle *scissor) const gl::Rectangle *scissor)
{ {
ANGLE_TRY(initResources()); ANGLE_TRY(initResources(context));
ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext(); ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext();
...@@ -1379,7 +1381,8 @@ gl::Error Blit11::copyDepth(const gl::Context *context, ...@@ -1379,7 +1381,8 @@ gl::Error Blit11::copyDepth(const gl::Context *context,
return gl::NoError(); return gl::NoError();
} }
gl::Error Blit11::copyDepthStencil(const TextureHelper11 &source, gl::Error Blit11::copyDepthStencil(const gl::Context *context,
const TextureHelper11 &source,
unsigned int sourceSubresource, unsigned int sourceSubresource,
const gl::Box &sourceArea, const gl::Box &sourceArea,
const gl::Extents &sourceSize, const gl::Extents &sourceSize,
...@@ -1389,11 +1392,12 @@ gl::Error Blit11::copyDepthStencil(const TextureHelper11 &source, ...@@ -1389,11 +1392,12 @@ gl::Error Blit11::copyDepthStencil(const TextureHelper11 &source,
const gl::Extents &destSize, const gl::Extents &destSize,
const gl::Rectangle *scissor) const gl::Rectangle *scissor)
{ {
return copyDepthStencilImpl(source, sourceSubresource, sourceArea, sourceSize, dest, return copyDepthStencilImpl(context, source, sourceSubresource, sourceArea, sourceSize, dest,
destSubresource, destArea, destSize, scissor, false); destSubresource, destArea, destSize, scissor, false);
} }
gl::Error Blit11::copyDepthStencilImpl(const TextureHelper11 &source, gl::Error Blit11::copyDepthStencilImpl(const gl::Context *context,
const TextureHelper11 &source,
unsigned int sourceSubresource, unsigned int sourceSubresource,
const gl::Box &sourceArea, const gl::Box &sourceArea,
const gl::Extents &sourceSize, const gl::Extents &sourceSize,
...@@ -1437,23 +1441,24 @@ gl::Error Blit11::copyDepthStencilImpl(const TextureHelper11 &source, ...@@ -1437,23 +1441,24 @@ gl::Error Blit11::copyDepthStencilImpl(const TextureHelper11 &source,
if (srcDXGIFormat == DXGI_FORMAT_R24G8_TYPELESS) if (srcDXGIFormat == DXGI_FORMAT_R24G8_TYPELESS)
{ {
ASSERT(sourceArea == destArea && sourceSize == destSize && scissor == nullptr); ASSERT(sourceArea == destArea && sourceSize == destSize && scissor == nullptr);
return copyAndConvert(source, sourceSubresource, sourceArea, sourceSize, dest, return copyAndConvert(context, source, sourceSubresource, sourceArea, sourceSize, dest,
destSubresource, destArea, destSize, scissor, copyOffset, destSubresource, destArea, destSize, scissor, copyOffset,
copyOffset, copySize, srcPixelSize, destPixelSize, copyOffset, copySize, srcPixelSize, destPixelSize,
BlitD24S8ToD32F); BlitD24S8ToD32F);
} }
ASSERT(srcDXGIFormat == DXGI_FORMAT_R32G8X24_TYPELESS); ASSERT(srcDXGIFormat == DXGI_FORMAT_R32G8X24_TYPELESS);
return copyAndConvert(source, sourceSubresource, sourceArea, sourceSize, dest, return copyAndConvert(context, source, sourceSubresource, sourceArea, sourceSize, dest,
destSubresource, destArea, destSize, scissor, copyOffset, copyOffset, destSubresource, destArea, destSize, scissor, copyOffset, copyOffset,
copySize, srcPixelSize, destPixelSize, BlitD32FS8ToD32F); copySize, srcPixelSize, destPixelSize, BlitD32FS8ToD32F);
} }
return copyAndConvert(source, sourceSubresource, sourceArea, sourceSize, dest, destSubresource, return copyAndConvert(context, source, sourceSubresource, sourceArea, sourceSize, dest,
destArea, destSize, scissor, copyOffset, copyOffset, copySize, destSubresource, destArea, destSize, scissor, copyOffset, copyOffset,
srcPixelSize, destPixelSize, StretchedBlitNearest); copySize, srcPixelSize, destPixelSize, StretchedBlitNearest);
} }
gl::Error Blit11::copyAndConvertImpl(const TextureHelper11 &source, gl::Error Blit11::copyAndConvertImpl(const gl::Context *context,
const TextureHelper11 &source,
unsigned int sourceSubresource, unsigned int sourceSubresource,
const gl::Box &sourceArea, const gl::Box &sourceArea,
const gl::Extents &sourceSize, const gl::Extents &sourceSize,
...@@ -1468,7 +1473,7 @@ gl::Error Blit11::copyAndConvertImpl(const TextureHelper11 &source, ...@@ -1468,7 +1473,7 @@ gl::Error Blit11::copyAndConvertImpl(const TextureHelper11 &source,
size_t destPixelStride, size_t destPixelStride,
BlitConvertFunction *convertFunction) BlitConvertFunction *convertFunction)
{ {
ANGLE_TRY(initResources()); ANGLE_TRY(initResources(context));
ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext(); ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext();
...@@ -1514,7 +1519,8 @@ gl::Error Blit11::copyAndConvertImpl(const TextureHelper11 &source, ...@@ -1514,7 +1519,8 @@ gl::Error Blit11::copyAndConvertImpl(const TextureHelper11 &source,
return gl::NoError(); return gl::NoError();
} }
gl::Error Blit11::copyAndConvert(const TextureHelper11 &source, gl::Error Blit11::copyAndConvert(const gl::Context *context,
const TextureHelper11 &source,
unsigned int sourceSubresource, unsigned int sourceSubresource,
const gl::Box &sourceArea, const gl::Box &sourceArea,
const gl::Extents &sourceSize, const gl::Extents &sourceSize,
...@@ -1530,7 +1536,7 @@ gl::Error Blit11::copyAndConvert(const TextureHelper11 &source, ...@@ -1530,7 +1536,7 @@ gl::Error Blit11::copyAndConvert(const TextureHelper11 &source,
size_t destPixelStride, size_t destPixelStride,
BlitConvertFunction *convertFunction) BlitConvertFunction *convertFunction)
{ {
ANGLE_TRY(initResources()); ANGLE_TRY(initResources(context));
ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext(); ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext();
...@@ -1544,9 +1550,9 @@ gl::Error Blit11::copyAndConvert(const TextureHelper11 &source, ...@@ -1544,9 +1550,9 @@ gl::Error Blit11::copyAndConvert(const TextureHelper11 &source,
deviceContext->CopySubresourceRegion(destStaging.get(), 0, 0, 0, 0, dest.get(), destSubresource, deviceContext->CopySubresourceRegion(destStaging.get(), 0, 0, 0, 0, dest.get(), destSubresource,
nullptr); nullptr);
ANGLE_TRY(copyAndConvertImpl(source, sourceSubresource, sourceArea, sourceSize, destStaging, ANGLE_TRY(copyAndConvertImpl(context, source, sourceSubresource, sourceArea, sourceSize,
destArea, destSize, scissor, readOffset, writeOffset, copySize, destStaging, destArea, destSize, scissor, readOffset, writeOffset,
srcPixelStride, destPixelStride, convertFunction)); copySize, srcPixelStride, destPixelStride, convertFunction));
// Work around timeouts/TDRs in older NVIDIA drivers. // Work around timeouts/TDRs in older NVIDIA drivers.
if (mRenderer->getWorkarounds().depthStencilBlitExtraCopy) if (mRenderer->getWorkarounds().depthStencilBlitExtraCopy)
...@@ -1566,7 +1572,8 @@ gl::Error Blit11::copyAndConvert(const TextureHelper11 &source, ...@@ -1566,7 +1572,8 @@ gl::Error Blit11::copyAndConvert(const TextureHelper11 &source,
return gl::NoError(); return gl::NoError();
} }
gl::Error Blit11::addBlitShaderToMap(BlitShaderType blitShaderType, gl::Error Blit11::addBlitShaderToMap(const gl::Context *context,
BlitShaderType blitShaderType,
ShaderDimension dimension, ShaderDimension dimension,
const ShaderData &shaderData, const ShaderData &shaderData,
const char *name) const char *name)
...@@ -1585,7 +1592,8 @@ gl::Error Blit11::addBlitShaderToMap(BlitShaderType blitShaderType, ...@@ -1585,7 +1592,8 @@ gl::Error Blit11::addBlitShaderToMap(BlitShaderType blitShaderType,
return gl::NoError(); return gl::NoError();
} }
gl::Error Blit11::addSwizzleShaderToMap(SwizzleShaderType swizzleShaderType, gl::Error Blit11::addSwizzleShaderToMap(const gl::Context *context,
SwizzleShaderType swizzleShaderType,
ShaderDimension dimension, ShaderDimension dimension,
const ShaderData &shaderData, const ShaderData &shaderData,
const char *name) const char *name)
...@@ -1610,7 +1618,8 @@ void Blit11::clearShaderMap() ...@@ -1610,7 +1618,8 @@ void Blit11::clearShaderMap()
mSwizzleShaderMap.clear(); mSwizzleShaderMap.clear();
} }
gl::Error Blit11::getBlitShader(GLenum destFormat, gl::Error Blit11::getBlitShader(const gl::Context *context,
GLenum destFormat,
GLenum sourceFormat, GLenum sourceFormat,
bool isSigned, bool isSigned,
bool unpackPremultiplyAlpha, bool unpackPremultiplyAlpha,
...@@ -1640,272 +1649,287 @@ gl::Error Blit11::getBlitShader(GLenum destFormat, ...@@ -1640,272 +1649,287 @@ gl::Error Blit11::getBlitShader(GLenum destFormat,
switch (blitShaderType) switch (blitShaderType)
{ {
case BLITSHADER_2D_RGBAF: case BLITSHADER_2D_RGBAF:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGBA2D), ShaderData(g_PS_PassthroughRGBA2D),
"Blit11 2D RGBA pixel shader")); "Blit11 2D RGBA pixel shader"));
break; break;
case BLITSHADER_2D_BGRAF: case BLITSHADER_2D_BGRAF:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGBA2D), ShaderData(g_PS_PassthroughRGBA2D),
"Blit11 2D BGRA pixel shader")); "Blit11 2D BGRA pixel shader"));
break; break;
case BLITSHADER_2D_RGBF: case BLITSHADER_2D_RGBF:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGB2D), ShaderData(g_PS_PassthroughRGB2D),
"Blit11 2D RGB pixel shader")); "Blit11 2D RGB pixel shader"));
break; break;
case BLITSHADER_2D_RGF: case BLITSHADER_2D_RGF:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRG2D), ShaderData(g_PS_PassthroughRG2D),
"Blit11 2D RG pixel shader")); "Blit11 2D RG pixel shader"));
break; break;
case BLITSHADER_2D_RF: case BLITSHADER_2D_RF:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_PassthroughR2D), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughR2D),
"Blit11 2D R pixel shader")); "Blit11 2D R pixel shader"));
break; break;
case BLITSHADER_2D_ALPHA: case BLITSHADER_2D_ALPHA:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_PassthroughA2D), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughA2D),
"Blit11 2D alpha pixel shader")); "Blit11 2D alpha pixel shader"));
break; break;
case BLITSHADER_2D_LUMA: case BLITSHADER_2D_LUMA:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughLum2D), ShaderData(g_PS_PassthroughLum2D),
"Blit11 2D lum pixel shader")); "Blit11 2D lum pixel shader"));
break; break;
case BLITSHADER_2D_LUMAALPHA: case BLITSHADER_2D_LUMAALPHA:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughLumAlpha2D), ShaderData(g_PS_PassthroughLumAlpha2D),
"Blit11 2D luminance alpha pixel shader")); "Blit11 2D luminance alpha pixel shader"));
break; break;
case BLITSHADER_2D_RGBAUI: case BLITSHADER_2D_RGBAUI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGBA2DUI), ShaderData(g_PS_PassthroughRGBA2DUI),
"Blit11 2D RGBA UI pixel shader")); "Blit11 2D RGBA UI pixel shader"));
break; break;
case BLITSHADER_2D_RGBAI: case BLITSHADER_2D_RGBAI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGBA2DI), ShaderData(g_PS_PassthroughRGBA2DI),
"Blit11 2D RGBA I pixel shader")); "Blit11 2D RGBA I pixel shader"));
break; break;
case BLITSHADER_2D_RGBUI: case BLITSHADER_2D_RGBUI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGB2DUI), ShaderData(g_PS_PassthroughRGB2DUI),
"Blit11 2D RGB UI pixel shader")); "Blit11 2D RGB UI pixel shader"));
break; break;
case BLITSHADER_2D_RGBI: case BLITSHADER_2D_RGBI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGB2DI), ShaderData(g_PS_PassthroughRGB2DI),
"Blit11 2D RGB I pixel shader")); "Blit11 2D RGB I pixel shader"));
break; break;
case BLITSHADER_2D_RGUI: case BLITSHADER_2D_RGUI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRG2DUI), ShaderData(g_PS_PassthroughRG2DUI),
"Blit11 2D RG UI pixel shader")); "Blit11 2D RG UI pixel shader"));
break; break;
case BLITSHADER_2D_RGI: case BLITSHADER_2D_RGI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRG2DI), ShaderData(g_PS_PassthroughRG2DI),
"Blit11 2D RG I pixel shader")); "Blit11 2D RG I pixel shader"));
break; break;
case BLITSHADER_2D_RUI: case BLITSHADER_2D_RUI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughR2DUI), ShaderData(g_PS_PassthroughR2DUI),
"Blit11 2D R UI pixel shader")); "Blit11 2D R UI pixel shader"));
break; break;
case BLITSHADER_2D_RI: case BLITSHADER_2D_RI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughR2DI), ShaderData(g_PS_PassthroughR2DI),
"Blit11 2D R I pixel shader")); "Blit11 2D R I pixel shader"));
break; break;
case BLITSHADER_3D_RGBAF: case BLITSHADER_3D_RGBAF:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughRGBA3D), ShaderData(g_PS_PassthroughRGBA3D),
"Blit11 3D RGBA pixel shader")); "Blit11 3D RGBA pixel shader"));
break; break;
case BLITSHADER_3D_RGBAUI: case BLITSHADER_3D_RGBAUI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughRGBA3DUI), ShaderData(g_PS_PassthroughRGBA3DUI),
"Blit11 3D UI RGBA pixel shader")); "Blit11 3D UI RGBA pixel shader"));
break; break;
case BLITSHADER_3D_RGBAI: case BLITSHADER_3D_RGBAI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughRGBA3DI), ShaderData(g_PS_PassthroughRGBA3DI),
"Blit11 3D I RGBA pixel shader")); "Blit11 3D I RGBA pixel shader"));
break; break;
case BLITSHADER_3D_BGRAF: case BLITSHADER_3D_BGRAF:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughRGBA3D), ShaderData(g_PS_PassthroughRGBA3D),
"Blit11 3D BGRA pixel shader")); "Blit11 3D BGRA pixel shader"));
break; break;
case BLITSHADER_3D_RGBF: case BLITSHADER_3D_RGBF:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughRGB3D), ShaderData(g_PS_PassthroughRGB3D),
"Blit11 3D RGB pixel shader")); "Blit11 3D RGB pixel shader"));
break; break;
case BLITSHADER_3D_RGBUI: case BLITSHADER_3D_RGBUI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughRGB3DUI), ShaderData(g_PS_PassthroughRGB3DUI),
"Blit11 3D RGB UI pixel shader")); "Blit11 3D RGB UI pixel shader"));
break; break;
case BLITSHADER_3D_RGBI: case BLITSHADER_3D_RGBI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughRGB3DI), ShaderData(g_PS_PassthroughRGB3DI),
"Blit11 3D RGB I pixel shader")); "Blit11 3D RGB I pixel shader"));
break; break;
case BLITSHADER_3D_RGF: case BLITSHADER_3D_RGF:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughRG3D), ShaderData(g_PS_PassthroughRG3D),
"Blit11 3D RG pixel shader")); "Blit11 3D RG pixel shader"));
break; break;
case BLITSHADER_3D_RGUI: case BLITSHADER_3D_RGUI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughRG3DUI), ShaderData(g_PS_PassthroughRG3DUI),
"Blit11 3D RG UI pixel shader")); "Blit11 3D RG UI pixel shader"));
break; break;
case BLITSHADER_3D_RGI: case BLITSHADER_3D_RGI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughRG3DI), ShaderData(g_PS_PassthroughRG3DI),
"Blit11 3D RG I pixel shader")); "Blit11 3D RG I pixel shader"));
break; break;
case BLITSHADER_3D_RF: case BLITSHADER_3D_RF:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ShaderData(g_PS_PassthroughR3D), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughR3D),
"Blit11 3D R pixel shader")); "Blit11 3D R pixel shader"));
break; break;
case BLITSHADER_3D_RUI: case BLITSHADER_3D_RUI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughR3DUI), ShaderData(g_PS_PassthroughR3DUI),
"Blit11 3D R UI pixel shader")); "Blit11 3D R UI pixel shader"));
break; break;
case BLITSHADER_3D_RI: case BLITSHADER_3D_RI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughR3DI), ShaderData(g_PS_PassthroughR3DI),
"Blit11 3D R I pixel shader")); "Blit11 3D R I pixel shader"));
break; break;
case BLITSHADER_3D_ALPHA: case BLITSHADER_3D_ALPHA:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughRGBA3D), ShaderData(g_PS_PassthroughRGBA3D),
"Blit11 3D alpha pixel shader")); "Blit11 3D alpha pixel shader"));
break; break;
case BLITSHADER_3D_LUMA: case BLITSHADER_3D_LUMA:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughLum3D), ShaderData(g_PS_PassthroughLum3D),
"Blit11 3D luminance pixel shader")); "Blit11 3D luminance pixel shader"));
break; break;
case BLITSHADER_3D_LUMAALPHA: case BLITSHADER_3D_LUMAALPHA:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_3D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_3D,
ShaderData(g_PS_PassthroughLumAlpha3D), ShaderData(g_PS_PassthroughLumAlpha3D),
"Blit11 3D luminance alpha pixel shader")); "Blit11 3D luminance alpha pixel shader"));
break; break;
case BLITSHADER_2D_RGBAF_PREMULTIPLY: case BLITSHADER_2D_RGBAF_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoF_PM_RGBA), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_PM_RGBA),
"Blit11 2D RGBA premultiply pixel shader")); "Blit11 2D RGBA premultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBAF_UNMULTIPLY: case BLITSHADER_2D_RGBAF_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoF_UM_RGBA), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_UM_RGBA),
"Blit11 2D RGBA unmultiply pixel shader")); "Blit11 2D RGBA unmultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBF_PREMULTIPLY: case BLITSHADER_2D_RGBF_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoF_PM_RGB), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_PM_RGB),
"Blit11 2D RGB premultiply pixel shader")); "Blit11 2D RGB premultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBF_UNMULTIPLY: case BLITSHADER_2D_RGBF_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoF_UM_RGB), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_UM_RGB),
"Blit11 2D RGB unmultiply pixel shader")); "Blit11 2D RGB unmultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBAF_TOUI: case BLITSHADER_2D_RGBAF_TOUI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoU_PT_RGBA), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoU_PT_RGBA),
"Blit11 2D RGBA to uint pixel shader")); "Blit11 2D RGBA to uint pixel shader"));
break; break;
case BLITSHADER_2D_RGBAF_TOUI_PREMULTIPLY: case BLITSHADER_2D_RGBAF_TOUI_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoU_PM_RGBA), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoU_PM_RGBA),
"Blit11 2D RGBA to uint premultiply pixel shader")); "Blit11 2D RGBA to uint premultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBAF_TOUI_UNMULTIPLY: case BLITSHADER_2D_RGBAF_TOUI_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoU_UM_RGBA), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoU_UM_RGBA),
"Blit11 2D RGBA to uint unmultiply pixel shader")); "Blit11 2D RGBA to uint unmultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBF_TOUI: case BLITSHADER_2D_RGBF_TOUI:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoU_PT_RGB), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoU_PT_RGB),
"Blit11 2D RGB to uint pixel shader")); "Blit11 2D RGB to uint pixel shader"));
break; break;
case BLITSHADER_2D_RGBF_TOUI_PREMULTIPLY: case BLITSHADER_2D_RGBF_TOUI_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoU_PM_RGB), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoU_PM_RGB),
"Blit11 2D RGB to uint premultiply pixel shader")); "Blit11 2D RGB to uint premultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBF_TOUI_UNMULTIPLY: case BLITSHADER_2D_RGBF_TOUI_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoU_UM_RGB), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoU_UM_RGB),
"Blit11 2D RGB to uint unmultiply pixel shader")); "Blit11 2D RGB to uint unmultiply pixel shader"));
break; break;
case BLITSHADER_2D_LUMAF_PREMULTIPLY: case BLITSHADER_2D_LUMAF_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoF_PM_LUMA), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_PM_LUMA),
"Blit11 2D LUMA premultiply pixel shader")); "Blit11 2D LUMA premultiply pixel shader"));
break; break;
case BLITSHADER_2D_LUMAF_UNMULTIPLY: case BLITSHADER_2D_LUMAF_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ShaderData(g_PS_FtoF_UM_LUMA), ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_UM_LUMA),
"Blit11 2D LUMA unmultiply pixel shader")); "Blit11 2D LUMA unmultiply pixel shader"));
break; break;
case BLITSHADER_2D_LUMAALPHAF_PREMULTIPLY: case BLITSHADER_2D_LUMAALPHAF_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_PM_LUMAALPHA), ShaderData(g_PS_FtoF_PM_LUMAALPHA),
"Blit11 2D LUMAALPHA premultiply pixel shader")); "Blit11 2D LUMAALPHA premultiply pixel shader"));
break; break;
case BLITSHADER_2D_LUMAALPHAF_UNMULTIPLY: case BLITSHADER_2D_LUMAALPHAF_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_UM_LUMAALPHA), ShaderData(g_PS_FtoF_UM_LUMAALPHA),
"Blit11 2D LUMAALPHA unmultiply pixel shader")); "Blit11 2D LUMAALPHA unmultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBAF_4444: case BLITSHADER_2D_RGBAF_4444:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGBA2D_4444), ShaderData(g_PS_PassthroughRGBA2D_4444),
"Blit11 2D RGBA 4444 pixel shader")); "Blit11 2D RGBA 4444 pixel shader"));
break; break;
case BLITSHADER_2D_RGBAF_4444_PREMULTIPLY: case BLITSHADER_2D_RGBAF_4444_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_PM_RGBA_4444), ShaderData(g_PS_FtoF_PM_RGBA_4444),
"Blit11 2D RGBA 4444 premultiply pixel shader")); "Blit11 2D RGBA 4444 premultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBAF_4444_UNMULTIPLY: case BLITSHADER_2D_RGBAF_4444_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_UM_RGBA_4444), ShaderData(g_PS_FtoF_UM_RGBA_4444),
"Blit11 2D RGBA 4444 unmultiply pixel shader")); "Blit11 2D RGBA 4444 unmultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBF_565: case BLITSHADER_2D_RGBF_565:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGB2D_565), ShaderData(g_PS_PassthroughRGB2D_565),
"Blit11 2D RGB 565 pixel shader")); "Blit11 2D RGB 565 pixel shader"));
break; break;
case BLITSHADER_2D_RGBF_565_PREMULTIPLY: case BLITSHADER_2D_RGBF_565_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_PM_RGB_565), ShaderData(g_PS_FtoF_PM_RGB_565),
"Blit11 2D RGB 565 premultiply pixel shader")); "Blit11 2D RGB 565 premultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBF_565_UNMULTIPLY: case BLITSHADER_2D_RGBF_565_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_UM_RGB_565), ShaderData(g_PS_FtoF_UM_RGB_565),
"Blit11 2D RGB 565 unmultiply pixel shader")); "Blit11 2D RGB 565 unmultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBAF_5551: case BLITSHADER_2D_RGBAF_5551:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGBA2D_5551), ShaderData(g_PS_PassthroughRGBA2D_5551),
"Blit11 2D RGBA 5551 pixel shader")); "Blit11 2D RGBA 5551 pixel shader"));
break; break;
case BLITSHADER_2D_RGBAF_5551_PREMULTIPLY: case BLITSHADER_2D_RGBAF_5551_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_PM_RGBA_5551), ShaderData(g_PS_FtoF_PM_RGBA_5551),
"Blit11 2D RGBA 5551 premultiply pixel shader")); "Blit11 2D RGBA 5551 premultiply pixel shader"));
break; break;
case BLITSHADER_2D_RGBAF_5551_UNMULTIPLY: case BLITSHADER_2D_RGBAF_5551_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D, ANGLE_TRY(addBlitShaderToMap(context, blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_UM_RGBA_5551), ShaderData(g_PS_FtoF_UM_RGBA_5551),
"Blit11 2D RGBA 5551 unmultiply pixel shader")); "Blit11 2D RGBA 5551 unmultiply pixel shader"));
break; break;
...@@ -1921,7 +1945,8 @@ gl::Error Blit11::getBlitShader(GLenum destFormat, ...@@ -1921,7 +1945,8 @@ gl::Error Blit11::getBlitShader(GLenum destFormat,
return gl::NoError(); return gl::NoError();
} }
gl::Error Blit11::getSwizzleShader(GLenum type, gl::Error Blit11::getSwizzleShader(const gl::Context *context,
GLenum type,
D3D11_SRV_DIMENSION viewDimension, D3D11_SRV_DIMENSION viewDimension,
const Shader **shader) const Shader **shader)
{ {
...@@ -1945,62 +1970,62 @@ gl::Error Blit11::getSwizzleShader(GLenum type, ...@@ -1945,62 +1970,62 @@ gl::Error Blit11::getSwizzleShader(GLenum type,
switch (swizzleShaderType) switch (swizzleShaderType)
{ {
case SWIZZLESHADER_2D_FLOAT: case SWIZZLESHADER_2D_FLOAT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_2D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_2D,
ShaderData(g_PS_SwizzleF2D), ShaderData(g_PS_SwizzleF2D),
"Blit11 2D F swizzle pixel shader")); "Blit11 2D F swizzle pixel shader"));
break; break;
case SWIZZLESHADER_2D_UINT: case SWIZZLESHADER_2D_UINT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_2D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_2D,
ShaderData(g_PS_SwizzleUI2D), ShaderData(g_PS_SwizzleUI2D),
"Blit11 2D UI swizzle pixel shader")); "Blit11 2D UI swizzle pixel shader"));
break; break;
case SWIZZLESHADER_2D_INT: case SWIZZLESHADER_2D_INT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_2D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_2D,
ShaderData(g_PS_SwizzleI2D), ShaderData(g_PS_SwizzleI2D),
"Blit11 2D I swizzle pixel shader")); "Blit11 2D I swizzle pixel shader"));
break; break;
case SWIZZLESHADER_CUBE_FLOAT: case SWIZZLESHADER_CUBE_FLOAT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_3D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_3D,
ShaderData(g_PS_SwizzleF2DArray), ShaderData(g_PS_SwizzleF2DArray),
"Blit11 2D Cube F swizzle pixel shader")); "Blit11 2D Cube F swizzle pixel shader"));
break; break;
case SWIZZLESHADER_CUBE_UINT: case SWIZZLESHADER_CUBE_UINT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_3D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_3D,
ShaderData(g_PS_SwizzleUI2DArray), ShaderData(g_PS_SwizzleUI2DArray),
"Blit11 2D Cube UI swizzle pixel shader")); "Blit11 2D Cube UI swizzle pixel shader"));
break; break;
case SWIZZLESHADER_CUBE_INT: case SWIZZLESHADER_CUBE_INT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_3D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_3D,
ShaderData(g_PS_SwizzleI2DArray), ShaderData(g_PS_SwizzleI2DArray),
"Blit11 2D Cube I swizzle pixel shader")); "Blit11 2D Cube I swizzle pixel shader"));
break; break;
case SWIZZLESHADER_3D_FLOAT: case SWIZZLESHADER_3D_FLOAT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_3D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_3D,
ShaderData(g_PS_SwizzleF3D), ShaderData(g_PS_SwizzleF3D),
"Blit11 3D F swizzle pixel shader")); "Blit11 3D F swizzle pixel shader"));
break; break;
case SWIZZLESHADER_3D_UINT: case SWIZZLESHADER_3D_UINT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_3D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_3D,
ShaderData(g_PS_SwizzleUI3D), ShaderData(g_PS_SwizzleUI3D),
"Blit11 3D UI swizzle pixel shader")); "Blit11 3D UI swizzle pixel shader"));
break; break;
case SWIZZLESHADER_3D_INT: case SWIZZLESHADER_3D_INT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_3D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_3D,
ShaderData(g_PS_SwizzleI3D), ShaderData(g_PS_SwizzleI3D),
"Blit11 3D I swizzle pixel shader")); "Blit11 3D I swizzle pixel shader"));
break; break;
case SWIZZLESHADER_ARRAY_FLOAT: case SWIZZLESHADER_ARRAY_FLOAT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_3D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_3D,
ShaderData(g_PS_SwizzleF2DArray), ShaderData(g_PS_SwizzleF2DArray),
"Blit11 2D Array F swizzle pixel shader")); "Blit11 2D Array F swizzle pixel shader"));
break; break;
case SWIZZLESHADER_ARRAY_UINT: case SWIZZLESHADER_ARRAY_UINT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_3D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_3D,
ShaderData(g_PS_SwizzleUI2DArray), ShaderData(g_PS_SwizzleUI2DArray),
"Blit11 2D Array UI swizzle pixel shader")); "Blit11 2D Array UI swizzle pixel shader"));
break; break;
case SWIZZLESHADER_ARRAY_INT: case SWIZZLESHADER_ARRAY_INT:
ANGLE_TRY(addSwizzleShaderToMap(swizzleShaderType, SHADER_3D, ANGLE_TRY(addSwizzleShaderToMap(context, swizzleShaderType, SHADER_3D,
ShaderData(g_PS_SwizzleI2DArray), ShaderData(g_PS_SwizzleI2DArray),
"Blit11 2D Array I swizzle pixel shader")); "Blit11 2D Array I swizzle pixel shader"));
break; break;
...@@ -2015,10 +2040,11 @@ gl::Error Blit11::getSwizzleShader(GLenum type, ...@@ -2015,10 +2040,11 @@ gl::Error Blit11::getSwizzleShader(GLenum type,
return gl::NoError(); return gl::NoError();
} }
gl::ErrorOrResult<TextureHelper11> Blit11::resolveDepth(const gl::Context *context, gl::Error Blit11::resolveDepth(const gl::Context *context,
RenderTarget11 *depth) RenderTarget11 *depth,
TextureHelper11 *textureOut)
{ {
ANGLE_TRY(initResources()); ANGLE_TRY(initResources(context));
// Multisampled depth stencil SRVs are not available in feature level 10.0 // Multisampled depth stencil SRVs are not available in feature level 10.0
ASSERT(mRenderer->getRenderer11DeviceCaps().featureLevel > D3D_FEATURE_LEVEL_10_0); ASSERT(mRenderer->getRenderer11DeviceCaps().featureLevel > D3D_FEATURE_LEVEL_10_0);
...@@ -2027,7 +2053,7 @@ gl::ErrorOrResult<TextureHelper11> Blit11::resolveDepth(const gl::Context *conte ...@@ -2027,7 +2053,7 @@ gl::ErrorOrResult<TextureHelper11> Blit11::resolveDepth(const gl::Context *conte
auto *deviceContext = mRenderer->getDeviceContext(); auto *deviceContext = mRenderer->getDeviceContext();
auto *stateManager = mRenderer->getStateManager(); auto *stateManager = mRenderer->getStateManager();
ANGLE_TRY(initResolveDepthOnly(depth->getFormatSet(), extents)); ANGLE_TRY(initResolveDepthOnly(context, depth->getFormatSet(), extents));
ANGLE_TRY(mResolveDepthStencilVS.resolve(mRenderer)); ANGLE_TRY(mResolveDepthStencilVS.resolve(mRenderer));
ANGLE_TRY(mResolveDepthPS.resolve(mRenderer)); ANGLE_TRY(mResolveDepthPS.resolve(mRenderer));
...@@ -2050,10 +2076,13 @@ gl::ErrorOrResult<TextureHelper11> Blit11::resolveDepth(const gl::Context *conte ...@@ -2050,10 +2076,13 @@ gl::ErrorOrResult<TextureHelper11> Blit11::resolveDepth(const gl::Context *conte
// Trigger the blit on the GPU. // Trigger the blit on the GPU.
deviceContext->Draw(6, 0); deviceContext->Draw(6, 0);
return mResolvedDepth; *textureOut = mResolvedDepth;
return gl::NoError();
} }
gl::Error Blit11::initResolveDepthOnly(const d3d11::Format &format, const gl::Extents &extents) gl::Error Blit11::initResolveDepthOnly(const gl::Context *context,
const d3d11::Format &format,
const gl::Extents &extents)
{ {
if (mResolvedDepth.valid() && extents == mResolvedDepth.getExtents() && if (mResolvedDepth.valid() && extents == mResolvedDepth.getExtents() &&
format.texFormat == mResolvedDepth.getFormat()) format.texFormat == mResolvedDepth.getFormat())
...@@ -2088,13 +2117,13 @@ gl::Error Blit11::initResolveDepthOnly(const d3d11::Format &format, const gl::Ex ...@@ -2088,13 +2117,13 @@ gl::Error Blit11::initResolveDepthOnly(const d3d11::Format &format, const gl::Ex
// Possibly D3D11 bug or undefined behaviour: Clear the DSV so that our first render // Possibly D3D11 bug or undefined behaviour: Clear the DSV so that our first render
// works as expected. Otherwise the results of the first use seem to be incorrect. // works as expected. Otherwise the results of the first use seem to be incorrect.
ID3D11DeviceContext *context = mRenderer->getDeviceContext(); ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext();
context->ClearDepthStencilView(mResolvedDepthDSView.get(), D3D11_CLEAR_DEPTH, 1.0f, 0); deviceContext->ClearDepthStencilView(mResolvedDepthDSView.get(), D3D11_CLEAR_DEPTH, 1.0f, 0);
return gl::NoError(); return gl::NoError();
} }
gl::Error Blit11::initResolveDepthStencil(const gl::Extents &extents) gl::Error Blit11::initResolveDepthStencil(const gl::Context *context, const gl::Extents &extents)
{ {
// Check if we need to recreate depth stencil view // Check if we need to recreate depth stencil view
if (mResolvedDepthStencil.valid() && extents == mResolvedDepthStencil.getExtents()) if (mResolvedDepthStencil.valid() && extents == mResolvedDepthStencil.getExtents())
...@@ -2133,18 +2162,19 @@ gl::Error Blit11::initResolveDepthStencil(const gl::Extents &extents) ...@@ -2133,18 +2162,19 @@ gl::Error Blit11::initResolveDepthStencil(const gl::Extents &extents)
return gl::NoError(); return gl::NoError();
} }
gl::ErrorOrResult<TextureHelper11> Blit11::resolveStencil(const gl::Context *context, gl::Error Blit11::resolveStencil(const gl::Context *context,
RenderTarget11 *depthStencil, RenderTarget11 *depthStencil,
bool alsoDepth) bool alsoDepth,
TextureHelper11 *textureOut)
{ {
ANGLE_TRY(initResources()); ANGLE_TRY(initResources(context));
// Multisampled depth stencil SRVs are not available in feature level 10.0 // Multisampled depth stencil SRVs are not available in feature level 10.0
ASSERT(mRenderer->getRenderer11DeviceCaps().featureLevel > D3D_FEATURE_LEVEL_10_0); ASSERT(mRenderer->getRenderer11DeviceCaps().featureLevel > D3D_FEATURE_LEVEL_10_0);
const auto &extents = depthStencil->getExtents(); const auto &extents = depthStencil->getExtents();
ANGLE_TRY(initResolveDepthStencil(extents)); ANGLE_TRY(initResolveDepthStencil(context, extents));
ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext(); ID3D11DeviceContext *deviceContext = mRenderer->getDeviceContext();
auto *stateManager = mRenderer->getStateManager(); auto *stateManager = mRenderer->getStateManager();
...@@ -2212,19 +2242,18 @@ gl::ErrorOrResult<TextureHelper11> Blit11::resolveStencil(const gl::Context *con ...@@ -2212,19 +2242,18 @@ gl::ErrorOrResult<TextureHelper11> Blit11::resolveStencil(const gl::Context *con
gl::Box copyBox(0, 0, 0, extents.width, extents.height, 1); gl::Box copyBox(0, 0, 0, extents.width, extents.height, 1);
TextureHelper11 dest;
ANGLE_TRY(mRenderer->createStagingTexture(ResourceType::Texture2D, depthStencil->getFormatSet(), ANGLE_TRY(mRenderer->createStagingTexture(ResourceType::Texture2D, depthStencil->getFormatSet(),
extents, StagingAccess::READ_WRITE, &dest)); extents, StagingAccess::READ_WRITE, textureOut));
const auto &copyFunction = GetCopyDepthStencilFunction(depthStencil->getInternalFormat()); const auto &copyFunction = GetCopyDepthStencilFunction(depthStencil->getInternalFormat());
const auto &dsFormatSet = depthStencil->getFormatSet(); const auto &dsFormatSet = depthStencil->getFormatSet();
const auto &dsDxgiInfo = d3d11::GetDXGIFormatSizeInfo(dsFormatSet.texFormat); const auto &dsDxgiInfo = d3d11::GetDXGIFormatSizeInfo(dsFormatSet.texFormat);
ANGLE_TRY(copyAndConvertImpl(mResolvedDepthStencil, 0, copyBox, extents, dest, copyBox, extents, ANGLE_TRY(copyAndConvertImpl(context, mResolvedDepthStencil, 0, copyBox, extents, *textureOut,
nullptr, 0, 0, 0, 8u, dsDxgiInfo.pixelBytes, copyFunction)); copyBox, extents, nullptr, 0, 0, 0, 8u, dsDxgiInfo.pixelBytes,
copyFunction));
// Return the resolved depth texture, which the caller must Release. return gl::NoError();
return dest;
} }
void Blit11::releaseResolveDepthStencilResources() void Blit11::releaseResolveDepthStencilResources()
......
...@@ -70,7 +70,8 @@ class Blit11 : angle::NonCopyable ...@@ -70,7 +70,8 @@ class Blit11 : angle::NonCopyable
const gl::Extents &destSize, const gl::Extents &destSize,
const gl::Rectangle *scissor); const gl::Rectangle *scissor);
gl::Error copyDepthStencil(const TextureHelper11 &source, gl::Error copyDepthStencil(const gl::Context *context,
const TextureHelper11 &source,
unsigned int sourceSubresource, unsigned int sourceSubresource,
const gl::Box &sourceArea, const gl::Box &sourceArea,
const gl::Extents &sourceSize, const gl::Extents &sourceSize,
...@@ -80,12 +81,14 @@ class Blit11 : angle::NonCopyable ...@@ -80,12 +81,14 @@ class Blit11 : angle::NonCopyable
const gl::Extents &destSize, const gl::Extents &destSize,
const gl::Rectangle *scissor); const gl::Rectangle *scissor);
gl::ErrorOrResult<TextureHelper11> resolveDepth(const gl::Context *context, gl::Error resolveDepth(const gl::Context *context,
RenderTarget11 *depth); RenderTarget11 *depth,
TextureHelper11 *textureOut);
gl::ErrorOrResult<TextureHelper11> resolveStencil(const gl::Context *context, gl::Error resolveStencil(const gl::Context *context,
RenderTarget11 *depthStencil, RenderTarget11 *depthStencil,
bool alsoDepth); bool alsoDepth,
TextureHelper11 *textureOut);
using BlitConvertFunction = void(const gl::Box &sourceArea, using BlitConvertFunction = void(const gl::Box &sourceArea,
const gl::Box &destArea, const gl::Box &destArea,
...@@ -226,9 +229,11 @@ class Blit11 : angle::NonCopyable ...@@ -226,9 +229,11 @@ class Blit11 : angle::NonCopyable
WriteVertexFunction vertexWriteFunction; WriteVertexFunction vertexWriteFunction;
}; };
gl::Error initResources(); gl::Error initResources(const gl::Context *context);
gl::Error getShaderSupport(const Shader &shader, ShaderSupport *supportOut); gl::Error getShaderSupport(const gl::Context *context,
const Shader &shader,
ShaderSupport *supportOut);
static BlitShaderType GetBlitShaderType(GLenum destinationFormat, static BlitShaderType GetBlitShaderType(GLenum destinationFormat,
GLenum sourceFormat, GLenum sourceFormat,
...@@ -239,7 +244,8 @@ class Blit11 : angle::NonCopyable ...@@ -239,7 +244,8 @@ class Blit11 : angle::NonCopyable
ShaderDimension dimension); ShaderDimension dimension);
static SwizzleShaderType GetSwizzleShaderType(GLenum type, D3D11_SRV_DIMENSION dimensionality); static SwizzleShaderType GetSwizzleShaderType(GLenum type, D3D11_SRV_DIMENSION dimensionality);
gl::Error copyDepthStencilImpl(const TextureHelper11 &source, gl::Error copyDepthStencilImpl(const gl::Context *context,
const TextureHelper11 &source,
unsigned int sourceSubresource, unsigned int sourceSubresource,
const gl::Box &sourceArea, const gl::Box &sourceArea,
const gl::Extents &sourceSize, const gl::Extents &sourceSize,
...@@ -250,7 +256,8 @@ class Blit11 : angle::NonCopyable ...@@ -250,7 +256,8 @@ class Blit11 : angle::NonCopyable
const gl::Rectangle *scissor, const gl::Rectangle *scissor,
bool stencilOnly); bool stencilOnly);
gl::Error copyAndConvertImpl(const TextureHelper11 &source, gl::Error copyAndConvertImpl(const gl::Context *context,
const TextureHelper11 &source,
unsigned int sourceSubresource, unsigned int sourceSubresource,
const gl::Box &sourceArea, const gl::Box &sourceArea,
const gl::Extents &sourceSize, const gl::Extents &sourceSize,
...@@ -265,7 +272,8 @@ class Blit11 : angle::NonCopyable ...@@ -265,7 +272,8 @@ class Blit11 : angle::NonCopyable
size_t destPixelStride, size_t destPixelStride,
BlitConvertFunction *convertFunction); BlitConvertFunction *convertFunction);
gl::Error copyAndConvert(const TextureHelper11 &source, gl::Error copyAndConvert(const gl::Context *context,
const TextureHelper11 &source,
unsigned int sourceSubresource, unsigned int sourceSubresource,
const gl::Box &sourceArea, const gl::Box &sourceArea,
const gl::Extents &sourceSize, const gl::Extents &sourceSize,
...@@ -281,12 +289,14 @@ class Blit11 : angle::NonCopyable ...@@ -281,12 +289,14 @@ class Blit11 : angle::NonCopyable
size_t destPixelStride, size_t destPixelStride,
BlitConvertFunction *convertFunction); BlitConvertFunction *convertFunction);
gl::Error addBlitShaderToMap(BlitShaderType blitShaderType, gl::Error addBlitShaderToMap(const gl::Context *context,
BlitShaderType blitShaderType,
ShaderDimension dimension, ShaderDimension dimension,
const ShaderData &shaderData, const ShaderData &shaderData,
const char *name); const char *name);
gl::Error getBlitShader(GLenum destFormat, gl::Error getBlitShader(const gl::Context *context,
GLenum destFormat,
GLenum sourceFormat, GLenum sourceFormat,
bool isSigned, bool isSigned,
bool unpackPremultiplyAlpha, bool unpackPremultiplyAlpha,
...@@ -294,19 +304,23 @@ class Blit11 : angle::NonCopyable ...@@ -294,19 +304,23 @@ class Blit11 : angle::NonCopyable
GLenum destTypeForDownsampling, GLenum destTypeForDownsampling,
ShaderDimension dimension, ShaderDimension dimension,
const Shader **shaderOut); const Shader **shaderOut);
gl::Error getSwizzleShader(GLenum type, gl::Error getSwizzleShader(const gl::Context *context,
GLenum type,
D3D11_SRV_DIMENSION viewDimension, D3D11_SRV_DIMENSION viewDimension,
const Shader **shaderOut); const Shader **shaderOut);
gl::Error addSwizzleShaderToMap(SwizzleShaderType swizzleShaderType, gl::Error addSwizzleShaderToMap(const gl::Context *context,
SwizzleShaderType swizzleShaderType,
ShaderDimension dimension, ShaderDimension dimension,
const ShaderData &shaderData, const ShaderData &shaderData,
const char *name); const char *name);
void clearShaderMap(); void clearShaderMap();
void releaseResolveDepthStencilResources(); void releaseResolveDepthStencilResources();
gl::Error initResolveDepthOnly(const d3d11::Format &format, const gl::Extents &extents); gl::Error initResolveDepthOnly(const gl::Context *context,
gl::Error initResolveDepthStencil(const gl::Extents &extents); const d3d11::Format &format,
const gl::Extents &extents);
gl::Error initResolveDepthStencil(const gl::Context *context, const gl::Extents &extents);
Renderer11 *mRenderer; Renderer11 *mRenderer;
......
...@@ -2217,10 +2217,9 @@ gl::Error Renderer11::copyImageInternal(const gl::Context *context, ...@@ -2217,10 +2217,9 @@ gl::Error Renderer11::copyImageInternal(const gl::Context *context,
if (sourceRenderTarget->getTexture().is2D() && sourceRenderTarget->isMultisampled()) if (sourceRenderTarget->getTexture().is2D() && sourceRenderTarget->isMultisampled())
{ {
TextureHelper11 tex; TextureHelper11 tex;
ANGLE_TRY_RESULT( ANGLE_TRY(resolveMultisampledTexture(context, sourceRenderTarget,
resolveMultisampledTexture(context, sourceRenderTarget, colorAttachment->getDepthSize(), colorAttachment->getDepthSize(),
colorAttachment->getStencilSize()), colorAttachment->getStencilSize(), &tex));
tex);
D3D11_SHADER_RESOURCE_VIEW_DESC viewDesc; D3D11_SHADER_RESOURCE_VIEW_DESC viewDesc;
viewDesc.Format = sourceRenderTarget->getFormatSet().srvFormat; viewDesc.Format = sourceRenderTarget->getFormatSet().srvFormat;
...@@ -3201,9 +3200,8 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Context *context, ...@@ -3201,9 +3200,8 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Context *context,
if (readRenderTarget->isMultisampled()) if (readRenderTarget->isMultisampled())
{ {
ANGLE_TRY_RESULT( ANGLE_TRY(resolveMultisampledTexture(context, readRenderTarget11, depthBlit, stencilBlit,
resolveMultisampledTexture(context, readRenderTarget11, depthBlit, stencilBlit), &readTexture));
readTexture);
if (!stencilBlit) if (!stencilBlit)
{ {
...@@ -3406,9 +3404,9 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Context *context, ...@@ -3406,9 +3404,9 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Context *context,
if (depthBlit && stencilBlit) if (depthBlit && stencilBlit)
{ {
ANGLE_TRY(mBlit->copyDepthStencil(readTexture, readSubresource, readArea, readSize, ANGLE_TRY(mBlit->copyDepthStencil(context, readTexture, readSubresource, readArea,
drawTexture, drawSubresource, drawArea, drawSize, readSize, drawTexture, drawSubresource, drawArea,
scissor)); drawSize, scissor));
} }
else if (depthBlit) else if (depthBlit)
{ {
...@@ -3491,20 +3489,20 @@ void Renderer11::onBufferDelete(const Buffer11 *deleted) ...@@ -3491,20 +3489,20 @@ void Renderer11::onBufferDelete(const Buffer11 *deleted)
mAliveBuffers.erase(deleted); mAliveBuffers.erase(deleted);
} }
gl::ErrorOrResult<TextureHelper11> Renderer11::resolveMultisampledTexture( gl::Error Renderer11::resolveMultisampledTexture(const gl::Context *context,
const gl::Context *context, RenderTarget11 *renderTarget,
RenderTarget11 *renderTarget, bool depth,
bool depth, bool stencil,
bool stencil) TextureHelper11 *textureOut)
{ {
if (depth && !stencil) if (depth && !stencil)
{ {
return mBlit->resolveDepth(context, renderTarget); return mBlit->resolveDepth(context, renderTarget, textureOut);
} }
if (stencil) if (stencil)
{ {
return mBlit->resolveStencil(context, renderTarget, depth); return mBlit->resolveStencil(context, renderTarget, depth, textureOut);
} }
const auto &formatSet = renderTarget->getFormatSet(); const auto &formatSet = renderTarget->getFormatSet();
...@@ -3539,7 +3537,8 @@ gl::ErrorOrResult<TextureHelper11> Renderer11::resolveMultisampledTexture( ...@@ -3539,7 +3537,8 @@ gl::ErrorOrResult<TextureHelper11> Renderer11::resolveMultisampledTexture(
mDeviceContext->ResolveSubresource(mCachedResolveTexture.get(), 0, mDeviceContext->ResolveSubresource(mCachedResolveTexture.get(), 0,
renderTarget->getTexture().get(), renderTarget->getTexture().get(),
renderTarget->getSubresourceIndex(), formatSet.texFormat); renderTarget->getSubresourceIndex(), formatSet.texFormat);
return mCachedResolveTexture; *textureOut = mCachedResolveTexture;
return gl::NoError();
} }
bool Renderer11::getLUID(LUID *adapterLuid) const bool Renderer11::getLUID(LUID *adapterLuid) const
......
...@@ -477,10 +477,11 @@ class Renderer11 : public RendererD3D ...@@ -477,10 +477,11 @@ class Renderer11 : public RendererD3D
int baseVertex, int baseVertex,
int instances); int instances);
gl::ErrorOrResult<TextureHelper11> resolveMultisampledTexture(const gl::Context *context, gl::Error resolveMultisampledTexture(const gl::Context *context,
RenderTarget11 *renderTarget, RenderTarget11 *renderTarget,
bool depth, bool depth,
bool stencil); bool stencil,
TextureHelper11 *textureOut);
void populateRenderer11DeviceCaps(); void populateRenderer11DeviceCaps();
......
...@@ -544,7 +544,7 @@ gl::Error TextureStorage11::updateSubresourceLevel(const gl::Context *context, ...@@ -544,7 +544,7 @@ gl::Error TextureStorage11::updateSubresourceLevel(const gl::Context *context,
{ {
// CopySubresourceRegion cannot copy partial depth stencils, use the blitter instead // CopySubresourceRegion cannot copy partial depth stencils, use the blitter instead
Blit11 *blitter = mRenderer->getBlitter(); Blit11 *blitter = mRenderer->getBlitter();
return blitter->copyDepthStencil(srcTexture, sourceSubresource, copyArea, texSize, return blitter->copyDepthStencil(context, srcTexture, sourceSubresource, copyArea, texSize,
*dstTexture, dstSubresource, copyArea, texSize, nullptr); *dstTexture, dstSubresource, copyArea, texSize, nullptr);
} }
...@@ -2424,8 +2424,8 @@ gl::Error TextureStorage11::initDropStencilTexture(const gl::Context *context, ...@@ -2424,8 +2424,8 @@ gl::Error TextureStorage11::initDropStencilTexture(const gl::Context *context,
gl::Extents wholeSize(wholeArea.width, wholeArea.height, 1); gl::Extents wholeSize(wholeArea.width, wholeArea.height, 1);
UINT subresource = getSubresourceIndex(index); UINT subresource = getSubresourceIndex(index);
ANGLE_TRY(mRenderer->getBlitter()->copyDepthStencil( ANGLE_TRY(mRenderer->getBlitter()->copyDepthStencil(
*sourceTexture, subresource, wholeArea, wholeSize, mDropStencilTexture, subresource, context, *sourceTexture, subresource, wholeArea, wholeSize, mDropStencilTexture,
wholeArea, wholeSize, nullptr)); subresource, wholeArea, wholeSize, nullptr));
} }
return gl::NoError(); return gl::NoError();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment