Commit f81d17c2 by Geoff Lang Committed by Commit Bot

D3D11: Downsample when copying to emulated 16-bit texture formats.

BUG=angleproject:2313 Change-Id: Ic1e679164d82f3024bb6842c9af2716aa10feb76 Reviewed-on: https://chromium-review.googlesource.com/900042 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 795d741a
......@@ -180,6 +180,7 @@ class RendererD3D : public BufferFactoryD3D, public MultisampleTextureInitialize
GLint sourceLevel,
const gl::Rectangle &sourceRect,
GLenum destFormat,
GLenum destType,
const gl::Offset &destOffset,
TextureStorage *storage,
GLenum destTarget,
......
......@@ -1092,10 +1092,10 @@ gl::Error TextureD3D_2D::copyTexture(const gl::Context *context,
ASSERT(isValidLevel(destLevel));
ANGLE_TRY(updateStorageLevel(context, destLevel));
ANGLE_TRY(mRenderer->copyTexture(context, source, static_cast<GLint>(sourceLevel),
sourceRect, internalFormatInfo.format, destOffset,
mTexStorage, target, destLevel, unpackFlipY,
unpackPremultiplyAlpha, unpackUnmultiplyAlpha));
ANGLE_TRY(mRenderer->copyTexture(
context, source, static_cast<GLint>(sourceLevel), sourceRect, internalFormatInfo.format,
internalFormatInfo.type, destOffset, mTexStorage, target, destLevel, unpackFlipY,
unpackPremultiplyAlpha, unpackUnmultiplyAlpha));
}
else
{
......@@ -1141,10 +1141,12 @@ gl::Error TextureD3D_2D::copySubTexture(const gl::Context *context,
ASSERT(isValidLevel(destLevel));
ANGLE_TRY(updateStorageLevel(context, destLevel));
const gl::InternalFormat &internalFormatInfo =
gl::GetSizedInternalFormatInfo(getInternalFormat(destLevel));
ANGLE_TRY(mRenderer->copyTexture(
context, source, static_cast<GLint>(sourceLevel), sourceArea,
gl::GetUnsizedFormat(getInternalFormat(destLevel)), destOffset, mTexStorage, target,
destLevel, unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha));
context, source, static_cast<GLint>(sourceLevel), sourceArea, internalFormatInfo.format,
internalFormatInfo.type, destOffset, mTexStorage, target, destLevel, unpackFlipY,
unpackPremultiplyAlpha, unpackUnmultiplyAlpha));
}
else
{
......@@ -1872,10 +1874,10 @@ gl::Error TextureD3D_Cube::copyTexture(const gl::Context *context,
ASSERT(isValidFaceLevel(faceIndex, destLevel));
ANGLE_TRY(updateStorageFaceLevel(context, faceIndex, destLevel));
ANGLE_TRY(mRenderer->copyTexture(context, source, static_cast<GLint>(sourceLevel),
sourceRect, internalFormatInfo.format, destOffset,
mTexStorage, target, destLevel, unpackFlipY,
unpackPremultiplyAlpha, unpackUnmultiplyAlpha));
ANGLE_TRY(mRenderer->copyTexture(
context, source, static_cast<GLint>(sourceLevel), sourceRect, internalFormatInfo.format,
internalFormatInfo.type, destOffset, mTexStorage, target, destLevel, unpackFlipY,
unpackPremultiplyAlpha, unpackUnmultiplyAlpha));
}
else
{
......@@ -1924,10 +1926,12 @@ gl::Error TextureD3D_Cube::copySubTexture(const gl::Context *context,
ASSERT(isValidFaceLevel(faceIndex, destLevel));
ANGLE_TRY(updateStorageFaceLevel(context, faceIndex, destLevel));
const gl::InternalFormat &internalFormatInfo =
gl::GetSizedInternalFormatInfo(getInternalFormat(destLevel, faceIndex));
ANGLE_TRY(mRenderer->copyTexture(
context, source, static_cast<GLint>(sourceLevel), sourceArea,
gl::GetUnsizedFormat(getInternalFormat(destLevel, faceIndex)), destOffset, mTexStorage,
target, destLevel, unpackFlipY, unpackPremultiplyAlpha, unpackUnmultiplyAlpha));
context, source, static_cast<GLint>(sourceLevel), sourceArea, internalFormatInfo.format,
internalFormatInfo.type, destOffset, mTexStorage, target, destLevel, unpackFlipY,
unpackPremultiplyAlpha, unpackUnmultiplyAlpha));
}
else
{
......
......@@ -38,19 +38,28 @@ namespace
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrg2di11ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrg2dui11ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2d11ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2d_565_11ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2di11ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2dui11ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2d11ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2d_4444_11ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2d_5551_11ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2di11ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2dui11ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_luma_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_lumaalpha_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_rgb_565_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_rgb_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_rgba_4444_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_rgba_5551_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_rgba_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_luma_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_lumaalpha_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_rgb_565_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_rgb_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_rgba_4444_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_rgba_5551_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_rgba_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftou_pm_rgb_ps.h"
#include "libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftou_pm_rgba_ps.h"
......@@ -732,6 +741,7 @@ Blit11::BlitShaderType Blit11::GetBlitShaderType(GLenum destinationFormat,
bool isSigned,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
GLenum destTypeForDownsampling,
ShaderDimension dimension)
{
if (dimension == SHADER_3D)
......@@ -812,6 +822,61 @@ Blit11::BlitShaderType Blit11::GetBlitShaderType(GLenum destinationFormat,
{
bool floatToIntBlit =
!gl::IsIntegerFormat(sourceFormat) && gl::IsIntegerFormat(destinationFormat);
// Check for the downsample formats first
switch (destTypeForDownsampling)
{
case GL_UNSIGNED_SHORT_4_4_4_4:
ASSERT(destinationFormat == GL_RGBA && !floatToIntBlit);
if (unpackPremultiplyAlpha == unpackUnmultiplyAlpha)
{
return BLITSHADER_2D_RGBAF_4444;
}
else if (unpackPremultiplyAlpha)
{
return BLITSHADER_2D_RGBAF_4444_PREMULTIPLY;
}
else
{
return BLITSHADER_2D_RGBAF_4444_UNMULTIPLY;
}
case GL_UNSIGNED_SHORT_5_6_5:
ASSERT(destinationFormat == GL_RGB && !floatToIntBlit);
if (unpackPremultiplyAlpha == unpackUnmultiplyAlpha)
{
return BLITSHADER_2D_RGBF_565;
}
else if (unpackPremultiplyAlpha)
{
return BLITSHADER_2D_RGBF_565_PREMULTIPLY;
}
else
{
return BLITSHADER_2D_RGBF_565_UNMULTIPLY;
}
case GL_UNSIGNED_SHORT_5_5_5_1:
ASSERT(destinationFormat == GL_RGBA && !floatToIntBlit);
if (unpackPremultiplyAlpha == unpackUnmultiplyAlpha)
{
return BLITSHADER_2D_RGBAF_5551;
}
else if (unpackPremultiplyAlpha)
{
return BLITSHADER_2D_RGBAF_5551_PREMULTIPLY;
}
else
{
return BLITSHADER_2D_RGBAF_5551_UNMULTIPLY;
}
default:
// By default, use the regular passthrough/multiply/unmultiply shaders. The above
// shaders are only needed for some emulated texture formats.
break;
}
if (unpackPremultiplyAlpha != unpackUnmultiplyAlpha || floatToIntBlit)
{
switch (destinationFormat)
......@@ -1122,6 +1187,7 @@ gl::Error Blit11::copyTexture(const gl::Context *context,
const gl::Extents &destSize,
const gl::Rectangle *scissor,
GLenum destFormat,
GLenum destTypeForDownsampling,
GLenum filter,
bool maskOffAlpha,
bool unpackPremultiplyAlpha,
......@@ -1147,7 +1213,7 @@ gl::Error Blit11::copyTexture(const gl::Context *context,
const Shader *shader = nullptr;
ANGLE_TRY(getBlitShader(destFormat, sourceFormat, isSigned, unpackPremultiplyAlpha,
unpackUnmultiplyAlpha, dimension, &shader));
unpackUnmultiplyAlpha, destTypeForDownsampling, dimension, &shader));
ShaderSupport support;
ANGLE_TRY(getShaderSupport(*shader, &support));
......@@ -1548,12 +1614,13 @@ gl::Error Blit11::getBlitShader(GLenum destFormat,
bool isSigned,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
GLenum destTypeForDownsampling,
ShaderDimension dimension,
const Shader **shader)
{
BlitShaderType blitShaderType =
GetBlitShaderType(destFormat, sourceFormat, isSigned, unpackPremultiplyAlpha,
unpackUnmultiplyAlpha, dimension);
unpackUnmultiplyAlpha, destTypeForDownsampling, dimension);
if (blitShaderType == BLITSHADER_INVALID)
{
......@@ -1796,6 +1863,51 @@ gl::Error Blit11::getBlitShader(GLenum destFormat,
ShaderData(g_PS_FtoF_UM_LUMAALPHA),
"Blit11 2D LUMAALPHA unmultiply pixel shader"));
break;
case BLITSHADER_2D_RGBAF_4444:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGBA2D_4444),
"Blit11 2D RGBA 4444 pixel shader"));
break;
case BLITSHADER_2D_RGBAF_4444_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_PM_RGBA_4444),
"Blit11 2D RGBA 4444 premultiply pixel shader"));
break;
case BLITSHADER_2D_RGBAF_4444_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_UM_RGBA_4444),
"Blit11 2D RGBA 4444 unmultiply pixel shader"));
break;
case BLITSHADER_2D_RGBF_565:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGB2D_565),
"Blit11 2D RGB 565 pixel shader"));
break;
case BLITSHADER_2D_RGBF_565_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_PM_RGB_565),
"Blit11 2D RGB 565 premultiply pixel shader"));
break;
case BLITSHADER_2D_RGBF_565_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_UM_RGB_565),
"Blit11 2D RGB 565 unmultiply pixel shader"));
break;
case BLITSHADER_2D_RGBAF_5551:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D,
ShaderData(g_PS_PassthroughRGBA2D_5551),
"Blit11 2D RGBA 5551 pixel shader"));
break;
case BLITSHADER_2D_RGBAF_5551_PREMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_PM_RGBA_5551),
"Blit11 2D RGBA 5551 premultiply pixel shader"));
break;
case BLITSHADER_2D_RGBAF_5551_UNMULTIPLY:
ANGLE_TRY(addBlitShaderToMap(blitShaderType, SHADER_2D,
ShaderData(g_PS_FtoF_UM_RGBA_5551),
"Blit11 2D RGBA 5551 unmultiply pixel shader"));
break;
default:
UNREACHABLE();
......
......@@ -33,6 +33,7 @@ class Blit11 : angle::NonCopyable
const gl::Extents &size,
const gl::SwizzleState &swizzleTarget);
// Set destTypeForDownsampling to GL_NONE to skip downsampling
gl::Error copyTexture(const gl::Context *context,
const d3d11::SharedSRV &source,
const gl::Box &sourceArea,
......@@ -43,6 +44,7 @@ class Blit11 : angle::NonCopyable
const gl::Extents &destSize,
const gl::Rectangle *scissor,
GLenum destFormat,
GLenum destTypeForDownsampling,
GLenum filter,
bool maskOffAlpha,
bool unpackPremultiplyAlpha,
......@@ -157,7 +159,20 @@ class Blit11 : angle::NonCopyable
BLITSHADER_2D_LUMAF_UNMULTIPLY,
BLITSHADER_2D_LUMAALPHAF_PREMULTIPLY,
BLITSHADER_2D_LUMAALPHAF_UNMULTIPLY
BLITSHADER_2D_LUMAALPHAF_UNMULTIPLY,
// Downsample 16-bit shaders
BLITSHADER_2D_RGBAF_4444,
BLITSHADER_2D_RGBAF_4444_PREMULTIPLY,
BLITSHADER_2D_RGBAF_4444_UNMULTIPLY,
BLITSHADER_2D_RGBF_565,
BLITSHADER_2D_RGBF_565_PREMULTIPLY,
BLITSHADER_2D_RGBF_565_UNMULTIPLY,
BLITSHADER_2D_RGBAF_5551,
BLITSHADER_2D_RGBAF_5551_PREMULTIPLY,
BLITSHADER_2D_RGBAF_5551_UNMULTIPLY,
};
enum SwizzleShaderType
......@@ -220,6 +235,7 @@ class Blit11 : angle::NonCopyable
bool isSigned,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
GLenum destTypeForDownsampling,
ShaderDimension dimension);
static SwizzleShaderType GetSwizzleShaderType(GLenum type, D3D11_SRV_DIMENSION dimensionality);
......@@ -275,6 +291,7 @@ class Blit11 : angle::NonCopyable
bool isSigned,
bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha,
GLenum destTypeForDownsampling,
ShaderDimension dimension,
const Shader **shaderOut);
gl::Error getSwizzleShader(GLenum type,
......
......@@ -2418,7 +2418,7 @@ gl::Error Renderer11::copyImageInternal(const gl::Context *context,
ANGLE_TRY(mBlit->copyTexture(context, readSRV, sourceArea, sourceSize, sourceFormat, dest,
destArea, destSize, nullptr, gl::GetUnsizedFormat(destFormat),
GL_NEAREST, false, false, false));
GL_NONE, GL_NEAREST, false, false, false));
return gl::NoError();
}
......@@ -2430,7 +2430,7 @@ gl::Error Renderer11::copyImageInternal(const gl::Context *context,
ANGLE_TRY(mBlit->copyTexture(context, source, sourceArea, sourceSize, sourceFormat, dest,
destArea, destSize, nullptr, gl::GetUnsizedFormat(destFormat),
GL_NEAREST, false, false, false));
GL_NONE, GL_NEAREST, false, false, false));
return gl::NoError();
}
......@@ -2536,6 +2536,7 @@ gl::Error Renderer11::copyTexture(const gl::Context *context,
GLint sourceLevel,
const gl::Rectangle &sourceRect,
GLenum destFormat,
GLenum destType,
const gl::Offset &destOffset,
TextureStorage *storage,
GLenum destTarget,
......@@ -2558,7 +2559,8 @@ gl::Error Renderer11::copyTexture(const gl::Context *context,
// Check for fast path where a CopySubresourceRegion can be used.
if (unpackPremultiplyAlpha == unpackUnmultiplyAlpha && !unpackFlipY &&
source->getFormat(GL_TEXTURE_2D, sourceLevel).info->format == destFormat &&
sourceStorage11->getFormatSet().texFormat == destStorage11->getFormatSet().texFormat)
sourceStorage11->getFormatSet().internalFormat ==
destStorage11->getFormatSet().internalFormat)
{
const TextureHelper11 *sourceResource = nullptr;
ANGLE_TRY(sourceStorage11->getResource(context, &sourceResource));
......@@ -2616,8 +2618,9 @@ gl::Error Renderer11::copyTexture(const gl::Context *context,
// copy
GLenum sourceFormat = source->getFormat(GL_TEXTURE_2D, sourceLevel).info->format;
ANGLE_TRY(mBlit->copyTexture(context, *sourceSRV, sourceArea, sourceSize, sourceFormat,
destRTV, destArea, destSize, nullptr, destFormat, GL_NEAREST,
false, unpackPremultiplyAlpha, unpackUnmultiplyAlpha));
destRTV, destArea, destSize, nullptr, destFormat, destType,
GL_NEAREST, false, unpackPremultiplyAlpha,
unpackUnmultiplyAlpha));
}
destStorage11->markLevelDirty(destLevel);
......@@ -3633,9 +3636,10 @@ gl::Error Renderer11::blitRenderbufferRect(const gl::Context *context,
// We don't currently support masking off any other channel than alpha
bool maskOffAlpha = colorMaskingNeeded && colorMask.alpha;
ASSERT(readSRV.valid());
ANGLE_TRY(mBlit->copyTexture(
context, readSRV, readArea, readSize, srcFormatInfo.format, drawRTV, drawArea,
drawSize, scissor, destFormatInfo.format, filter, maskOffAlpha, false, false));
ANGLE_TRY(mBlit->copyTexture(context, readSRV, readArea, readSize, srcFormatInfo.format,
drawRTV, drawArea, drawSize, scissor,
destFormatInfo.format, GL_NONE, filter, maskOffAlpha,
false, false));
}
}
......
......@@ -204,6 +204,7 @@ class Renderer11 : public RendererD3D
GLint sourceLevel,
const gl::Rectangle &sourceRect,
GLenum destFormat,
GLenum destType,
const gl::Offset &destOffset,
TextureStorage *storage,
GLenum destTarget,
......
......@@ -685,9 +685,12 @@ gl::Error TextureStorage11::generateMipmap(const gl::Context *context,
gl::Extents destSize(dest->getWidth(), dest->getHeight(), dest->getDepth());
Blit11 *blitter = mRenderer->getBlitter();
GLenum format = gl::GetUnsizedFormat(source->getInternalFormat());
const gl::InternalFormat &sourceInternalFormat =
gl::GetSizedInternalFormatInfo(source->getInternalFormat());
GLenum format = sourceInternalFormat.format;
GLenum type = sourceInternalFormat.type;
return blitter->copyTexture(context, sourceSRV, sourceArea, sourceSize, format, destRTV,
destArea, destSize, nullptr, format, GL_LINEAR, false, false,
destArea, destSize, nullptr, format, type, GL_LINEAR, false, false,
false);
}
......
......@@ -82,6 +82,65 @@ float4 PS_FtoF_UM_RGB(in float4 inPosition : SV_POSITION, in float2 inTexCoord :
return color;
}
float4 PS_FtoF_PM_RGBA_4444(in float4 inPosition : SV_POSITION, in float2 inTexCoord : TEXCOORD0) : SV_TARGET0
{
float4 color = TextureF.Sample(Sampler, inTexCoord).rgba;
color.rgb *= color.a;
color = round(color * float4(15, 15, 15, 15)) / float4(15, 15, 15, 15);
return color;
}
float4 PS_FtoF_UM_RGBA_4444(in float4 inPosition : SV_POSITION, in float2 inTexCoord : TEXCOORD0) : SV_TARGET0
{
float4 color = TextureF.Sample(Sampler, inTexCoord).rgba;
if (color.a > 0.0f)
{
color.rgb /= color.a;
}
color = round(color * float4(15, 15, 15, 15)) / float4(15, 15, 15, 15);
return color;
}
float4 PS_FtoF_PM_RGB_565(in float4 inPosition : SV_POSITION, in float2 inTexCoord : TEXCOORD0) : SV_TARGET0
{
float4 color = TextureF.Sample(Sampler, inTexCoord).rgba;
color.rgb *= color.a;
color.rgb = round(color.rgb * float3(31, 63, 31)) / float3(31, 63, 31);
color.a = 1.0f;
return color;
}
float4 PS_FtoF_UM_RGB_565(in float4 inPosition : SV_POSITION, in float2 inTexCoord : TEXCOORD0) : SV_TARGET0
{
float4 color = TextureF.Sample(Sampler, inTexCoord).rgba;
if (color.a > 0.0f)
{
color.rgb /= color.a;
}
color.rgb = round(color.rgb * float3(31, 63, 31)) / float3(31, 63, 31);
color.a = 1.0f;
return color;
}
float4 PS_FtoF_PM_RGBA_5551(in float4 inPosition : SV_POSITION, in float2 inTexCoord : TEXCOORD0) : SV_TARGET0
{
float4 color = TextureF.Sample(Sampler, inTexCoord).rgba;
color.rgb *= color.a;
color = round(color * float4(31, 31, 31, 1)) / float4(31, 31, 31, 1);
return color;
}
float4 PS_FtoF_UM_RGBA_5551(in float4 inPosition : SV_POSITION, in float2 inTexCoord : TEXCOORD0) : SV_TARGET0
{
float4 color = TextureF.Sample(Sampler, inTexCoord).rgba;
if (color.a > 0.0f)
{
color.rgb /= color.a;
}
color = round(color * float4(31, 31, 31, 1)) / float4(31, 31, 31, 1);
return color;
}
// Float to uint RGBA
uint4 PS_FtoU_PT_RGBA(in float4 inPosition : SV_POSITION, in float2 inTexCoord : TEXCOORD0) : SV_TARGET0
{
......
......@@ -120,3 +120,18 @@ float4 PS_PassthroughLumAlpha2D(in float4 inPosition : SV_POSITION, in float2 in
{
return TextureF.Sample(Sampler, inTexCoord).rrra;
}
float4 PS_PassthroughRGBA2D_4444(in float4 inPosition : SV_POSITION, in float2 inTexCoord : TEXCOORD0) : SV_TARGET0
{
return round(TextureF.Sample(Sampler, inTexCoord) * float4(15, 15, 15, 15)) / float4(15, 15, 15, 15);
}
float4 PS_PassthroughRGB2D_565(in float4 inPosition : SV_POSITION, in float2 inTexCoord : TEXCOORD0) : SV_TARGET0
{
return float4(round(TextureF.Sample(Sampler, inTexCoord).rgb * float3(31, 63, 31)) / float3(31, 63, 31), 1.0f);
}
float4 PS_PassthroughRGBA2D_5551(in float4 inPosition : SV_POSITION, in float2 inTexCoord : TEXCOORD0) : SV_TARGET0
{
return round(TextureF.Sample(Sampler, inTexCoord) * float4(31, 31, 31, 1)) / float4(31, 31, 31, 1);
}
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Sampler sampler NA NA 0 1
// TextureF texture float4 2d 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
ps_4_0
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 1
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mul r0.xyz, r0.wwww, r0.xyzx
mul r0.xyz, r0.xyzx, l(31.000000, 63.000000, 31.000000, 0.000000)
round_ne r0.xyz, r0.xyzx
mul o0.xyz, r0.xyzx, l(0.032258, 0.015873, 0.032258, 0.000000)
mov o0.w, l(1.000000)
ret
// Approximately 7 instruction slots used
#endif
const BYTE g_PS_FtoF_PM_RGB_565[] = {
68, 88, 66, 67, 97, 172, 97, 223, 192, 211, 214, 154, 80, 239, 188, 18, 133, 64, 185,
69, 1, 0, 0, 0, 236, 2, 0, 0, 5, 0, 0, 0, 52, 0, 0, 0, 220, 0,
0, 0, 52, 1, 0, 0, 104, 1, 0, 0, 112, 2, 0, 0, 82, 68, 69, 70, 160,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 28, 0, 0, 0,
0, 4, 255, 255, 0, 1, 0, 0, 109, 0, 0, 0, 92, 0, 0, 0, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 100, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4,
0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0,
83, 97, 109, 112, 108, 101, 114, 0, 84, 101, 120, 116, 117, 114, 101, 70, 0, 77, 105,
99, 114, 111, 115, 111, 102, 116, 32, 40, 82, 41, 32, 72, 76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, 32, 54, 46, 51, 46, 57,
54, 48, 48, 46, 49, 54, 51, 56, 52, 0, 171, 73, 83, 71, 78, 80, 0, 0, 0,
2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 68, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 3, 3, 0, 0, 83,
86, 95, 80, 79, 83, 73, 84, 73, 79, 78, 0, 84, 69, 88, 67, 79, 79, 82, 68,
0, 171, 171, 171, 79, 83, 71, 78, 44, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0,
0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0, 83, 86, 95, 84, 65, 82, 71, 69, 84, 0, 171, 171, 83,
72, 68, 82, 0, 1, 0, 0, 64, 0, 0, 0, 64, 0, 0, 0, 90, 0, 0, 3,
0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, 0, 0, 0,
0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0, 0, 0, 0, 0, 104, 0, 0, 2, 1, 0, 0, 0, 69,
0, 0, 9, 242, 0, 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0,
70, 126, 16, 0, 0, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 56, 0, 0,
7, 114, 0, 16, 0, 0, 0, 0, 0, 246, 15, 16, 0, 0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0, 56, 0, 0, 10, 114, 0, 16, 0, 0, 0, 0, 0, 70,
2, 16, 0, 0, 0, 0, 0, 2, 64, 0, 0, 0, 0, 248, 65, 0, 0, 124, 66,
0, 0, 248, 65, 0, 0, 0, 0, 64, 0, 0, 5, 114, 0, 16, 0, 0, 0, 0,
0, 70, 2, 16, 0, 0, 0, 0, 0, 56, 0, 0, 10, 114, 32, 16, 0, 0, 0,
0, 0, 70, 2, 16, 0, 0, 0, 0, 0, 2, 64, 0, 0, 8, 33, 4, 61, 33,
8, 130, 60, 8, 33, 4, 61, 0, 0, 0, 0, 54, 0, 0, 5, 130, 32, 16, 0,
0, 0, 0, 0, 1, 64, 0, 0, 0, 0, 128, 63, 62, 0, 0, 1, 83, 84, 65,
84, 116, 0, 0, 0, 7, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0,
0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Sampler sampler NA NA 0 1
// TextureF texture float4 2d 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
ps_4_0
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 1
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mul r0.xyz, r0.wwww, r0.xyzx
mul r0.xyzw, r0.xyzw, l(15.000000, 15.000000, 15.000000, 15.000000)
round_ne r0.xyzw, r0.xyzw
mul o0.xyzw, r0.xyzw, l(0.066667, 0.066667, 0.066667, 0.066667)
ret
// Approximately 6 instruction slots used
#endif
const BYTE g_PS_FtoF_PM_RGBA_4444[] = {
68, 88, 66, 67, 15, 251, 56, 98, 146, 199, 188, 230, 85, 155, 133, 203, 252, 127, 105,
152, 1, 0, 0, 0, 216, 2, 0, 0, 5, 0, 0, 0, 52, 0, 0, 0, 220, 0,
0, 0, 52, 1, 0, 0, 104, 1, 0, 0, 92, 2, 0, 0, 82, 68, 69, 70, 160,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 28, 0, 0, 0,
0, 4, 255, 255, 0, 1, 0, 0, 109, 0, 0, 0, 92, 0, 0, 0, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 100, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4,
0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0,
83, 97, 109, 112, 108, 101, 114, 0, 84, 101, 120, 116, 117, 114, 101, 70, 0, 77, 105,
99, 114, 111, 115, 111, 102, 116, 32, 40, 82, 41, 32, 72, 76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, 32, 54, 46, 51, 46, 57,
54, 48, 48, 46, 49, 54, 51, 56, 52, 0, 171, 73, 83, 71, 78, 80, 0, 0, 0,
2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 68, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 3, 3, 0, 0, 83,
86, 95, 80, 79, 83, 73, 84, 73, 79, 78, 0, 84, 69, 88, 67, 79, 79, 82, 68,
0, 171, 171, 171, 79, 83, 71, 78, 44, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0,
0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0, 83, 86, 95, 84, 65, 82, 71, 69, 84, 0, 171, 171, 83,
72, 68, 82, 236, 0, 0, 0, 64, 0, 0, 0, 59, 0, 0, 0, 90, 0, 0, 3,
0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, 0, 0, 0,
0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0, 0, 0, 0, 0, 104, 0, 0, 2, 1, 0, 0, 0, 69,
0, 0, 9, 242, 0, 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0,
70, 126, 16, 0, 0, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 56, 0, 0,
7, 114, 0, 16, 0, 0, 0, 0, 0, 246, 15, 16, 0, 0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0, 56, 0, 0, 10, 242, 0, 16, 0, 0, 0, 0, 0, 70,
14, 16, 0, 0, 0, 0, 0, 2, 64, 0, 0, 0, 0, 112, 65, 0, 0, 112, 65,
0, 0, 112, 65, 0, 0, 112, 65, 64, 0, 0, 5, 242, 0, 16, 0, 0, 0, 0,
0, 70, 14, 16, 0, 0, 0, 0, 0, 56, 0, 0, 10, 242, 32, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0, 0, 0, 0, 0, 2, 64, 0, 0, 137, 136, 136, 61, 137,
136, 136, 61, 137, 136, 136, 61, 137, 136, 136, 61, 62, 0, 0, 1, 83, 84, 65, 84,
116, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Sampler sampler NA NA 0 1
// TextureF texture float4 2d 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
ps_4_0
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 1
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mul r0.xyz, r0.wwww, r0.xyzx
mul r0.xyzw, r0.xyzw, l(31.000000, 31.000000, 31.000000, 1.000000)
round_ne r0.xyzw, r0.xyzw
mul o0.xyzw, r0.xyzw, l(0.032258, 0.032258, 0.032258, 1.000000)
ret
// Approximately 6 instruction slots used
#endif
const BYTE g_PS_FtoF_PM_RGBA_5551[] = {
68, 88, 66, 67, 185, 216, 228, 109, 2, 121, 116, 157, 253, 153, 175, 80, 8, 169, 132,
52, 1, 0, 0, 0, 216, 2, 0, 0, 5, 0, 0, 0, 52, 0, 0, 0, 220, 0,
0, 0, 52, 1, 0, 0, 104, 1, 0, 0, 92, 2, 0, 0, 82, 68, 69, 70, 160,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 28, 0, 0, 0,
0, 4, 255, 255, 0, 1, 0, 0, 109, 0, 0, 0, 92, 0, 0, 0, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 100, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4,
0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0,
83, 97, 109, 112, 108, 101, 114, 0, 84, 101, 120, 116, 117, 114, 101, 70, 0, 77, 105,
99, 114, 111, 115, 111, 102, 116, 32, 40, 82, 41, 32, 72, 76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, 32, 54, 46, 51, 46, 57,
54, 48, 48, 46, 49, 54, 51, 56, 52, 0, 171, 73, 83, 71, 78, 80, 0, 0, 0,
2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 68, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 3, 3, 0, 0, 83,
86, 95, 80, 79, 83, 73, 84, 73, 79, 78, 0, 84, 69, 88, 67, 79, 79, 82, 68,
0, 171, 171, 171, 79, 83, 71, 78, 44, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0,
0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0, 83, 86, 95, 84, 65, 82, 71, 69, 84, 0, 171, 171, 83,
72, 68, 82, 236, 0, 0, 0, 64, 0, 0, 0, 59, 0, 0, 0, 90, 0, 0, 3,
0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, 0, 0, 0,
0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0, 0, 0, 0, 0, 104, 0, 0, 2, 1, 0, 0, 0, 69,
0, 0, 9, 242, 0, 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0,
70, 126, 16, 0, 0, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 56, 0, 0,
7, 114, 0, 16, 0, 0, 0, 0, 0, 246, 15, 16, 0, 0, 0, 0, 0, 70, 2,
16, 0, 0, 0, 0, 0, 56, 0, 0, 10, 242, 0, 16, 0, 0, 0, 0, 0, 70,
14, 16, 0, 0, 0, 0, 0, 2, 64, 0, 0, 0, 0, 248, 65, 0, 0, 248, 65,
0, 0, 248, 65, 0, 0, 128, 63, 64, 0, 0, 5, 242, 0, 16, 0, 0, 0, 0,
0, 70, 14, 16, 0, 0, 0, 0, 0, 56, 0, 0, 10, 242, 32, 16, 0, 0, 0,
0, 0, 70, 14, 16, 0, 0, 0, 0, 0, 2, 64, 0, 0, 8, 33, 4, 61, 8,
33, 4, 61, 8, 33, 4, 61, 0, 0, 128, 63, 62, 0, 0, 1, 83, 84, 65, 84,
116, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Sampler sampler NA NA 0 1
// TextureF texture float4 2d 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
ps_4_0
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 2
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
lt r1.x, l(0.000000), r0.w
div r1.yzw, r0.xxyz, r0.wwww
movc r0.xyz, r1.xxxx, r1.yzwy, r0.xyzx
mul r0.xyz, r0.xyzx, l(31.000000, 63.000000, 31.000000, 0.000000)
round_ne r0.xyz, r0.xyzx
mul o0.xyz, r0.xyzx, l(0.032258, 0.015873, 0.032258, 0.000000)
mov o0.w, l(1.000000)
ret
// Approximately 9 instruction slots used
#endif
const BYTE g_PS_FtoF_UM_RGB_565[] = {
68, 88, 66, 67, 164, 109, 122, 199, 140, 135, 62, 115, 200, 55, 219, 230, 131, 48, 142,
112, 1, 0, 0, 0, 44, 3, 0, 0, 5, 0, 0, 0, 52, 0, 0, 0, 220, 0,
0, 0, 52, 1, 0, 0, 104, 1, 0, 0, 176, 2, 0, 0, 82, 68, 69, 70, 160,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 28, 0, 0, 0,
0, 4, 255, 255, 0, 1, 0, 0, 109, 0, 0, 0, 92, 0, 0, 0, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 100, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4,
0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0,
83, 97, 109, 112, 108, 101, 114, 0, 84, 101, 120, 116, 117, 114, 101, 70, 0, 77, 105,
99, 114, 111, 115, 111, 102, 116, 32, 40, 82, 41, 32, 72, 76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, 32, 54, 46, 51, 46, 57,
54, 48, 48, 46, 49, 54, 51, 56, 52, 0, 171, 73, 83, 71, 78, 80, 0, 0, 0,
2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 68, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 3, 3, 0, 0, 83,
86, 95, 80, 79, 83, 73, 84, 73, 79, 78, 0, 84, 69, 88, 67, 79, 79, 82, 68,
0, 171, 171, 171, 79, 83, 71, 78, 44, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0,
0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0, 83, 86, 95, 84, 65, 82, 71, 69, 84, 0, 171, 171, 83,
72, 68, 82, 64, 1, 0, 0, 64, 0, 0, 0, 80, 0, 0, 0, 90, 0, 0, 3,
0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, 0, 0, 0,
0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0, 0, 0, 0, 0, 104, 0, 0, 2, 2, 0, 0, 0, 69,
0, 0, 9, 242, 0, 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0,
70, 126, 16, 0, 0, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 49, 0, 0,
7, 18, 0, 16, 0, 1, 0, 0, 0, 1, 64, 0, 0, 0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0, 14, 0, 0, 7, 226, 0, 16, 0, 1, 0, 0, 0, 6,
9, 16, 0, 0, 0, 0, 0, 246, 15, 16, 0, 0, 0, 0, 0, 55, 0, 0, 9,
114, 0, 16, 0, 0, 0, 0, 0, 6, 0, 16, 0, 1, 0, 0, 0, 150, 7, 16,
0, 1, 0, 0, 0, 70, 2, 16, 0, 0, 0, 0, 0, 56, 0, 0, 10, 114, 0,
16, 0, 0, 0, 0, 0, 70, 2, 16, 0, 0, 0, 0, 0, 2, 64, 0, 0, 0,
0, 248, 65, 0, 0, 124, 66, 0, 0, 248, 65, 0, 0, 0, 0, 64, 0, 0, 5,
114, 0, 16, 0, 0, 0, 0, 0, 70, 2, 16, 0, 0, 0, 0, 0, 56, 0, 0,
10, 114, 32, 16, 0, 0, 0, 0, 0, 70, 2, 16, 0, 0, 0, 0, 0, 2, 64,
0, 0, 8, 33, 4, 61, 33, 8, 130, 60, 8, 33, 4, 61, 0, 0, 0, 0, 54,
0, 0, 5, 130, 32, 16, 0, 0, 0, 0, 0, 1, 64, 0, 0, 0, 0, 128, 63,
62, 0, 0, 1, 83, 84, 65, 84, 116, 0, 0, 0, 9, 0, 0, 0, 2, 0, 0,
0, 0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Sampler sampler NA NA 0 1
// TextureF texture float4 2d 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
ps_4_0
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 2
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
lt r1.x, l(0.000000), r0.w
div r1.yzw, r0.xxyz, r0.wwww
movc r0.xyz, r1.xxxx, r1.yzwy, r0.xyzx
mul r0.xyzw, r0.xyzw, l(15.000000, 15.000000, 15.000000, 15.000000)
round_ne r0.xyzw, r0.xyzw
mul o0.xyzw, r0.xyzw, l(0.066667, 0.066667, 0.066667, 0.066667)
ret
// Approximately 8 instruction slots used
#endif
const BYTE g_PS_FtoF_UM_RGBA_4444[] = {
68, 88, 66, 67, 224, 225, 0, 83, 69, 240, 80, 127, 12, 135, 119, 52, 68, 222, 157,
124, 1, 0, 0, 0, 24, 3, 0, 0, 5, 0, 0, 0, 52, 0, 0, 0, 220, 0,
0, 0, 52, 1, 0, 0, 104, 1, 0, 0, 156, 2, 0, 0, 82, 68, 69, 70, 160,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 28, 0, 0, 0,
0, 4, 255, 255, 0, 1, 0, 0, 109, 0, 0, 0, 92, 0, 0, 0, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 100, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4,
0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0,
83, 97, 109, 112, 108, 101, 114, 0, 84, 101, 120, 116, 117, 114, 101, 70, 0, 77, 105,
99, 114, 111, 115, 111, 102, 116, 32, 40, 82, 41, 32, 72, 76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, 32, 54, 46, 51, 46, 57,
54, 48, 48, 46, 49, 54, 51, 56, 52, 0, 171, 73, 83, 71, 78, 80, 0, 0, 0,
2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 68, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 3, 3, 0, 0, 83,
86, 95, 80, 79, 83, 73, 84, 73, 79, 78, 0, 84, 69, 88, 67, 79, 79, 82, 68,
0, 171, 171, 171, 79, 83, 71, 78, 44, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0,
0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0, 83, 86, 95, 84, 65, 82, 71, 69, 84, 0, 171, 171, 83,
72, 68, 82, 44, 1, 0, 0, 64, 0, 0, 0, 75, 0, 0, 0, 90, 0, 0, 3,
0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, 0, 0, 0,
0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0, 0, 0, 0, 0, 104, 0, 0, 2, 2, 0, 0, 0, 69,
0, 0, 9, 242, 0, 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0,
70, 126, 16, 0, 0, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 49, 0, 0,
7, 18, 0, 16, 0, 1, 0, 0, 0, 1, 64, 0, 0, 0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0, 14, 0, 0, 7, 226, 0, 16, 0, 1, 0, 0, 0, 6,
9, 16, 0, 0, 0, 0, 0, 246, 15, 16, 0, 0, 0, 0, 0, 55, 0, 0, 9,
114, 0, 16, 0, 0, 0, 0, 0, 6, 0, 16, 0, 1, 0, 0, 0, 150, 7, 16,
0, 1, 0, 0, 0, 70, 2, 16, 0, 0, 0, 0, 0, 56, 0, 0, 10, 242, 0,
16, 0, 0, 0, 0, 0, 70, 14, 16, 0, 0, 0, 0, 0, 2, 64, 0, 0, 0,
0, 112, 65, 0, 0, 112, 65, 0, 0, 112, 65, 0, 0, 112, 65, 64, 0, 0, 5,
242, 0, 16, 0, 0, 0, 0, 0, 70, 14, 16, 0, 0, 0, 0, 0, 56, 0, 0,
10, 242, 32, 16, 0, 0, 0, 0, 0, 70, 14, 16, 0, 0, 0, 0, 0, 2, 64,
0, 0, 137, 136, 136, 61, 137, 136, 136, 61, 137, 136, 136, 61, 137, 136, 136, 61, 62,
0, 0, 1, 83, 84, 65, 84, 116, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Sampler sampler NA NA 0 1
// TextureF texture float4 2d 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
ps_4_0
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 2
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
lt r1.x, l(0.000000), r0.w
div r1.yzw, r0.xxyz, r0.wwww
movc r0.xyz, r1.xxxx, r1.yzwy, r0.xyzx
mul r0.xyzw, r0.xyzw, l(31.000000, 31.000000, 31.000000, 1.000000)
round_ne r0.xyzw, r0.xyzw
mul o0.xyzw, r0.xyzw, l(0.032258, 0.032258, 0.032258, 1.000000)
ret
// Approximately 8 instruction slots used
#endif
const BYTE g_PS_FtoF_UM_RGBA_5551[] = {
68, 88, 66, 67, 29, 108, 141, 131, 138, 82, 143, 142, 9, 196, 65, 248, 160, 22, 244,
76, 1, 0, 0, 0, 24, 3, 0, 0, 5, 0, 0, 0, 52, 0, 0, 0, 220, 0,
0, 0, 52, 1, 0, 0, 104, 1, 0, 0, 156, 2, 0, 0, 82, 68, 69, 70, 160,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 28, 0, 0, 0,
0, 4, 255, 255, 0, 1, 0, 0, 109, 0, 0, 0, 92, 0, 0, 0, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 100, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 4,
0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1, 0, 0, 0, 13, 0, 0, 0,
83, 97, 109, 112, 108, 101, 114, 0, 84, 101, 120, 116, 117, 114, 101, 70, 0, 77, 105,
99, 114, 111, 115, 111, 102, 116, 32, 40, 82, 41, 32, 72, 76, 83, 76, 32, 83, 104,
97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101, 114, 32, 54, 46, 51, 46, 57,
54, 48, 48, 46, 49, 54, 51, 56, 52, 0, 171, 73, 83, 71, 78, 80, 0, 0, 0,
2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 68, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 3, 3, 0, 0, 83,
86, 95, 80, 79, 83, 73, 84, 73, 79, 78, 0, 84, 69, 88, 67, 79, 79, 82, 68,
0, 171, 171, 171, 79, 83, 71, 78, 44, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0,
0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
0, 0, 15, 0, 0, 0, 83, 86, 95, 84, 65, 82, 71, 69, 84, 0, 171, 171, 83,
72, 68, 82, 44, 1, 0, 0, 64, 0, 0, 0, 75, 0, 0, 0, 90, 0, 0, 3,
0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0, 112, 16, 0, 0, 0, 0,
0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0, 0, 0, 101, 0,
0, 3, 242, 32, 16, 0, 0, 0, 0, 0, 104, 0, 0, 2, 2, 0, 0, 0, 69,
0, 0, 9, 242, 0, 16, 0, 0, 0, 0, 0, 70, 16, 16, 0, 1, 0, 0, 0,
70, 126, 16, 0, 0, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0, 0, 49, 0, 0,
7, 18, 0, 16, 0, 1, 0, 0, 0, 1, 64, 0, 0, 0, 0, 0, 0, 58, 0,
16, 0, 0, 0, 0, 0, 14, 0, 0, 7, 226, 0, 16, 0, 1, 0, 0, 0, 6,
9, 16, 0, 0, 0, 0, 0, 246, 15, 16, 0, 0, 0, 0, 0, 55, 0, 0, 9,
114, 0, 16, 0, 0, 0, 0, 0, 6, 0, 16, 0, 1, 0, 0, 0, 150, 7, 16,
0, 1, 0, 0, 0, 70, 2, 16, 0, 0, 0, 0, 0, 56, 0, 0, 10, 242, 0,
16, 0, 0, 0, 0, 0, 70, 14, 16, 0, 0, 0, 0, 0, 2, 64, 0, 0, 0,
0, 248, 65, 0, 0, 248, 65, 0, 0, 248, 65, 0, 0, 128, 63, 64, 0, 0, 5,
242, 0, 16, 0, 0, 0, 0, 0, 70, 14, 16, 0, 0, 0, 0, 0, 56, 0, 0,
10, 242, 32, 16, 0, 0, 0, 0, 0, 70, 14, 16, 0, 0, 0, 0, 0, 2, 64,
0, 0, 8, 33, 4, 61, 8, 33, 4, 61, 8, 33, 4, 61, 0, 0, 128, 63, 62,
0, 0, 1, 83, 84, 65, 84, 116, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0,
0, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
......@@ -16,8 +16,8 @@
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
......@@ -31,7 +31,7 @@
//
// Target Sampler Source Sampler Source Resource
// -------------- --------------- ----------------
// s0 s0 t0
// s0 s0 t0
//
//
// Level9 shader bytecode:
......@@ -54,7 +54,7 @@ dcl_temps 1
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mov o0.w, r0.w
mov o0.xyz, l(0,0,0,0)
ret
ret
// Approximately 4 instruction slots used
#endif
......
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Sampler sampler NA NA 0 1
// TextureF texture float4 2d 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
//
// Sampler/Resource to DX9 shader sampler mappings:
//
// Target Sampler Source Sampler Source Resource
// -------------- --------------- ----------------
// s0 s0 t0
//
//
// Level9 shader bytecode:
//
ps_2_x
def c0, 31, 63, 0.5, 1
def c1, 0.0322580636, 0.0158730168, 0, 0
dcl t0.xy
dcl_2d s0
texld r0, t0, s0
mad r0.xyz, r0, c0.xyxw, c0.z
frc r1.xyz, r0
add r0.xyz, r0, -r1
mul r0.xyz, r0, c1.xyxw
mov r0.w, c0.w
mov oC0, r0
// approximately 7 instruction slots used (1 texture, 6 arithmetic)
ps_4_0
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 1
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mul r0.xyz, r0.xyzx, l(31.000000, 63.000000, 31.000000, 0.000000)
round_ne r0.xyz, r0.xyzx
mul o0.xyz, r0.xyzx, l(0.032258, 0.015873, 0.032258, 0.000000)
mov o0.w, l(1.000000)
ret
// Approximately 6 instruction slots used
#endif
const BYTE g_PS_PassthroughRGB2D_565[] = {
68, 88, 66, 67, 105, 242, 108, 67, 163, 28, 241, 133, 95, 108, 226, 145, 239, 95, 107,
142, 1, 0, 0, 0, 188, 3, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 32, 1,
0, 0, 12, 2, 0, 0, 136, 2, 0, 0, 48, 3, 0, 0, 136, 3, 0, 0, 65,
111, 110, 57, 224, 0, 0, 0, 224, 0, 0, 0, 0, 2, 255, 255, 184, 0, 0, 0,
40, 0, 0, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 1, 0, 36,
0, 0, 0, 40, 0, 0, 0, 0, 0, 1, 2, 255, 255, 81, 0, 0, 5, 0, 0,
15, 160, 0, 0, 248, 65, 0, 0, 124, 66, 0, 0, 0, 63, 0, 0, 128, 63, 81,
0, 0, 5, 1, 0, 15, 160, 8, 33, 4, 61, 33, 8, 130, 60, 0, 0, 0, 0,
0, 0, 0, 0, 31, 0, 0, 2, 0, 0, 0, 128, 0, 0, 3, 176, 31, 0, 0,
2, 0, 0, 0, 144, 0, 8, 15, 160, 66, 0, 0, 3, 0, 0, 15, 128, 0, 0,
228, 176, 0, 8, 228, 160, 4, 0, 0, 4, 0, 0, 7, 128, 0, 0, 228, 128, 0,
0, 196, 160, 0, 0, 170, 160, 19, 0, 0, 2, 1, 0, 7, 128, 0, 0, 228, 128,
2, 0, 0, 3, 0, 0, 7, 128, 0, 0, 228, 128, 1, 0, 228, 129, 5, 0, 0,
3, 0, 0, 7, 128, 0, 0, 228, 128, 1, 0, 196, 160, 1, 0, 0, 2, 0, 0,
8, 128, 0, 0, 255, 160, 1, 0, 0, 2, 0, 8, 15, 128, 0, 0, 228, 128, 255,
255, 0, 0, 83, 72, 68, 82, 228, 0, 0, 0, 64, 0, 0, 0, 57, 0, 0, 0,
90, 0, 0, 3, 0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0, 112, 16,
0, 0, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0, 1, 0,
0, 0, 101, 0, 0, 3, 242, 32, 16, 0, 0, 0, 0, 0, 104, 0, 0, 2, 1,
0, 0, 0, 69, 0, 0, 9, 242, 0, 16, 0, 0, 0, 0, 0, 70, 16, 16, 0,
1, 0, 0, 0, 70, 126, 16, 0, 0, 0, 0, 0, 0, 96, 16, 0, 0, 0, 0,
0, 56, 0, 0, 10, 114, 0, 16, 0, 0, 0, 0, 0, 70, 2, 16, 0, 0, 0,
0, 0, 2, 64, 0, 0, 0, 0, 248, 65, 0, 0, 124, 66, 0, 0, 248, 65, 0,
0, 0, 0, 64, 0, 0, 5, 114, 0, 16, 0, 0, 0, 0, 0, 70, 2, 16, 0,
0, 0, 0, 0, 56, 0, 0, 10, 114, 32, 16, 0, 0, 0, 0, 0, 70, 2, 16,
0, 0, 0, 0, 0, 2, 64, 0, 0, 8, 33, 4, 61, 33, 8, 130, 60, 8, 33,
4, 61, 0, 0, 0, 0, 54, 0, 0, 5, 130, 32, 16, 0, 0, 0, 0, 0, 1,
64, 0, 0, 0, 0, 128, 63, 62, 0, 0, 1, 83, 84, 65, 84, 116, 0, 0, 0,
6, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 82, 68, 69, 70, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, 0, 0, 109, 0, 0, 0,
92, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 100, 0, 0, 0, 2, 0,
0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 1,
0, 0, 0, 13, 0, 0, 0, 83, 97, 109, 112, 108, 101, 114, 0, 84, 101, 120, 116,
117, 114, 101, 70, 0, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 40, 82, 41, 32,
72, 76, 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108, 101,
114, 32, 54, 46, 51, 46, 57, 54, 48, 48, 46, 49, 54, 51, 56, 52, 0, 171, 73,
83, 71, 78, 80, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0,
0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0,
0, 0, 3, 3, 0, 0, 83, 86, 95, 80, 79, 83, 73, 84, 73, 79, 78, 0, 84,
69, 88, 67, 79, 79, 82, 68, 0, 171, 171, 171, 79, 83, 71, 78, 44, 0, 0, 0,
1, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 83, 86, 95, 84, 65, 82,
71, 69, 84, 0, 171, 171};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Sampler sampler NA NA 0 1
// TextureF texture float4 2d 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
//
// Sampler/Resource to DX9 shader sampler mappings:
//
// Target Sampler Source Sampler Source Resource
// -------------- --------------- ----------------
// s0 s0 t0
//
//
// Level9 shader bytecode:
//
ps_2_x
def c0, 15, 0.5, 0.0666666701, 0
dcl t0.xy
dcl_2d s0
texld r0, t0, s0
mad r0, r0, c0.x, c0.y
frc r1, r0
add r0, r0, -r1
mul r0, r0, c0.z
mov oC0, r0
// approximately 6 instruction slots used (1 texture, 5 arithmetic)
ps_4_0
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 1
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mul r0.xyzw, r0.xyzw, l(15.000000, 15.000000, 15.000000, 15.000000)
round_ne r0.xyzw, r0.xyzw
mul o0.xyzw, r0.xyzw, l(0.066667, 0.066667, 0.066667, 0.066667)
ret
// Approximately 5 instruction slots used
#endif
const BYTE g_PS_PassthroughRGBA2D_4444[] = {
68, 88, 66, 67, 4, 201, 61, 162, 56, 105, 105, 80, 176, 91, 47, 135, 51, 243, 102,
181, 1, 0, 0, 0, 132, 3, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 252, 0,
0, 0, 212, 1, 0, 0, 80, 2, 0, 0, 248, 2, 0, 0, 80, 3, 0, 0, 65,
111, 110, 57, 188, 0, 0, 0, 188, 0, 0, 0, 0, 2, 255, 255, 148, 0, 0, 0,
40, 0, 0, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 1, 0, 36,
0, 0, 0, 40, 0, 0, 0, 0, 0, 1, 2, 255, 255, 81, 0, 0, 5, 0, 0,
15, 160, 0, 0, 112, 65, 0, 0, 0, 63, 137, 136, 136, 61, 0, 0, 0, 0, 31,
0, 0, 2, 0, 0, 0, 128, 0, 0, 3, 176, 31, 0, 0, 2, 0, 0, 0, 144,
0, 8, 15, 160, 66, 0, 0, 3, 0, 0, 15, 128, 0, 0, 228, 176, 0, 8, 228,
160, 4, 0, 0, 4, 0, 0, 15, 128, 0, 0, 228, 128, 0, 0, 0, 160, 0, 0,
85, 160, 19, 0, 0, 2, 1, 0, 15, 128, 0, 0, 228, 128, 2, 0, 0, 3, 0,
0, 15, 128, 0, 0, 228, 128, 1, 0, 228, 129, 5, 0, 0, 3, 0, 0, 15, 128,
0, 0, 228, 128, 0, 0, 170, 160, 1, 0, 0, 2, 0, 8, 15, 128, 0, 0, 228,
128, 255, 255, 0, 0, 83, 72, 68, 82, 208, 0, 0, 0, 64, 0, 0, 0, 52, 0,
0, 0, 90, 0, 0, 3, 0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0,
112, 16, 0, 0, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0,
1, 0, 0, 0, 101, 0, 0, 3, 242, 32, 16, 0, 0, 0, 0, 0, 104, 0, 0,
2, 1, 0, 0, 0, 69, 0, 0, 9, 242, 0, 16, 0, 0, 0, 0, 0, 70, 16,
16, 0, 1, 0, 0, 0, 70, 126, 16, 0, 0, 0, 0, 0, 0, 96, 16, 0, 0,
0, 0, 0, 56, 0, 0, 10, 242, 0, 16, 0, 0, 0, 0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 2, 64, 0, 0, 0, 0, 112, 65, 0, 0, 112, 65, 0, 0, 112,
65, 0, 0, 112, 65, 64, 0, 0, 5, 242, 0, 16, 0, 0, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0, 56, 0, 0, 10, 242, 32, 16, 0, 0, 0, 0, 0, 70,
14, 16, 0, 0, 0, 0, 0, 2, 64, 0, 0, 137, 136, 136, 61, 137, 136, 136, 61,
137, 136, 136, 61, 137, 136, 136, 61, 62, 0, 0, 1, 83, 84, 65, 84, 116, 0, 0,
0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 82, 68, 69, 70, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, 0, 0, 109, 0, 0,
0, 92, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 100, 0, 0, 0, 2,
0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 13, 0, 0, 0, 83, 97, 109, 112, 108, 101, 114, 0, 84, 101, 120,
116, 117, 114, 101, 70, 0, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 40, 82, 41,
32, 72, 76, 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108,
101, 114, 32, 54, 46, 51, 46, 57, 54, 48, 48, 46, 49, 54, 51, 56, 52, 0, 171,
73, 83, 71, 78, 80, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0,
0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1,
0, 0, 0, 3, 3, 0, 0, 83, 86, 95, 80, 79, 83, 73, 84, 73, 79, 78, 0,
84, 69, 88, 67, 79, 79, 82, 68, 0, 171, 171, 171, 79, 83, 71, 78, 44, 0, 0,
0, 1, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 83, 86, 95, 84, 65,
82, 71, 69, 84, 0, 171, 171};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Sampler sampler NA NA 0 1
// TextureF texture float4 2d 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION 0 xyzw 0 POS float
// TEXCOORD 0 xy 1 NONE float xy
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET 0 xyzw 0 TARGET float xyzw
//
//
// Sampler/Resource to DX9 shader sampler mappings:
//
// Target Sampler Source Sampler Source Resource
// -------------- --------------- ----------------
// s0 s0 t0
//
//
// Level9 shader bytecode:
//
ps_2_x
def c0, 31, 1, 0.5, 0.0322580636
dcl t0.xy
dcl_2d s0
texld r0, t0, s0
mad r0, r0, c0.xxxy, c0.z
frc r1, r0
add r0, r0, -r1
mul r0, r0, c0.wwwy
mov oC0, r0
// approximately 6 instruction slots used (1 texture, 5 arithmetic)
ps_4_0
dcl_sampler s0, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 1
sample r0.xyzw, v1.xyxx, t0.xyzw, s0
mul r0.xyzw, r0.xyzw, l(31.000000, 31.000000, 31.000000, 1.000000)
round_ne r0.xyzw, r0.xyzw
mul o0.xyzw, r0.xyzw, l(0.032258, 0.032258, 0.032258, 1.000000)
ret
// Approximately 5 instruction slots used
#endif
const BYTE g_PS_PassthroughRGBA2D_5551[] = {
68, 88, 66, 67, 221, 154, 179, 105, 22, 88, 164, 112, 178, 143, 32, 219, 231, 5, 188,
234, 1, 0, 0, 0, 132, 3, 0, 0, 6, 0, 0, 0, 56, 0, 0, 0, 252, 0,
0, 0, 212, 1, 0, 0, 80, 2, 0, 0, 248, 2, 0, 0, 80, 3, 0, 0, 65,
111, 110, 57, 188, 0, 0, 0, 188, 0, 0, 0, 0, 2, 255, 255, 148, 0, 0, 0,
40, 0, 0, 0, 0, 0, 40, 0, 0, 0, 40, 0, 0, 0, 40, 0, 1, 0, 36,
0, 0, 0, 40, 0, 0, 0, 0, 0, 1, 2, 255, 255, 81, 0, 0, 5, 0, 0,
15, 160, 0, 0, 248, 65, 0, 0, 128, 63, 0, 0, 0, 63, 8, 33, 4, 61, 31,
0, 0, 2, 0, 0, 0, 128, 0, 0, 3, 176, 31, 0, 0, 2, 0, 0, 0, 144,
0, 8, 15, 160, 66, 0, 0, 3, 0, 0, 15, 128, 0, 0, 228, 176, 0, 8, 228,
160, 4, 0, 0, 4, 0, 0, 15, 128, 0, 0, 228, 128, 0, 0, 64, 160, 0, 0,
170, 160, 19, 0, 0, 2, 1, 0, 15, 128, 0, 0, 228, 128, 2, 0, 0, 3, 0,
0, 15, 128, 0, 0, 228, 128, 1, 0, 228, 129, 5, 0, 0, 3, 0, 0, 15, 128,
0, 0, 228, 128, 0, 0, 127, 160, 1, 0, 0, 2, 0, 8, 15, 128, 0, 0, 228,
128, 255, 255, 0, 0, 83, 72, 68, 82, 208, 0, 0, 0, 64, 0, 0, 0, 52, 0,
0, 0, 90, 0, 0, 3, 0, 96, 16, 0, 0, 0, 0, 0, 88, 24, 0, 4, 0,
112, 16, 0, 0, 0, 0, 0, 85, 85, 0, 0, 98, 16, 0, 3, 50, 16, 16, 0,
1, 0, 0, 0, 101, 0, 0, 3, 242, 32, 16, 0, 0, 0, 0, 0, 104, 0, 0,
2, 1, 0, 0, 0, 69, 0, 0, 9, 242, 0, 16, 0, 0, 0, 0, 0, 70, 16,
16, 0, 1, 0, 0, 0, 70, 126, 16, 0, 0, 0, 0, 0, 0, 96, 16, 0, 0,
0, 0, 0, 56, 0, 0, 10, 242, 0, 16, 0, 0, 0, 0, 0, 70, 14, 16, 0,
0, 0, 0, 0, 2, 64, 0, 0, 0, 0, 248, 65, 0, 0, 248, 65, 0, 0, 248,
65, 0, 0, 128, 63, 64, 0, 0, 5, 242, 0, 16, 0, 0, 0, 0, 0, 70, 14,
16, 0, 0, 0, 0, 0, 56, 0, 0, 10, 242, 32, 16, 0, 0, 0, 0, 0, 70,
14, 16, 0, 0, 0, 0, 0, 2, 64, 0, 0, 8, 33, 4, 61, 8, 33, 4, 61,
8, 33, 4, 61, 0, 0, 128, 63, 62, 0, 0, 1, 83, 84, 65, 84, 116, 0, 0,
0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 82, 68, 69, 70, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2, 0, 0, 0, 28, 0, 0, 0, 0, 4, 255, 255, 0, 1, 0, 0, 109, 0, 0,
0, 92, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 100, 0, 0, 0, 2,
0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0,
1, 0, 0, 0, 13, 0, 0, 0, 83, 97, 109, 112, 108, 101, 114, 0, 84, 101, 120,
116, 117, 114, 101, 70, 0, 77, 105, 99, 114, 111, 115, 111, 102, 116, 32, 40, 82, 41,
32, 72, 76, 83, 76, 32, 83, 104, 97, 100, 101, 114, 32, 67, 111, 109, 112, 105, 108,
101, 114, 32, 54, 46, 51, 46, 57, 54, 48, 48, 46, 49, 54, 51, 56, 52, 0, 171,
73, 83, 71, 78, 80, 0, 0, 0, 2, 0, 0, 0, 8, 0, 0, 0, 56, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0,
0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1,
0, 0, 0, 3, 3, 0, 0, 83, 86, 95, 80, 79, 83, 73, 84, 73, 79, 78, 0,
84, 69, 88, 67, 79, 79, 82, 68, 0, 171, 171, 171, 79, 83, 71, 78, 44, 0, 0,
0, 1, 0, 0, 0, 8, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 83, 86, 95, 84, 65,
82, 71, 69, 84, 0, 171, 171};
......@@ -31,6 +31,10 @@ call:BuildShader Passthrough2D11.hlsl PS_PassthroughR2D ps_4_0_level_9_3
call:BuildShader Passthrough2D11.hlsl PS_PassthroughLum2D ps_4_0_level_9_3 compiled\passthroughlum2d11ps.h %debug%
call:BuildShader Passthrough2D11.hlsl PS_PassthroughLumAlpha2D ps_4_0_level_9_3 compiled\passthroughlumalpha2d11ps.h %debug%
call:BuildShader Passthrough2D11.hlsl PS_PassthroughRGBA2D_4444 ps_4_0_level_9_3 compiled\passthroughrgba2d_4444_11ps.h %debug%
call:BuildShader Passthrough2D11.hlsl PS_PassthroughRGB2D_565 ps_4_0_level_9_3 compiled\passthroughrgb2d_565_11ps.h %debug%
call:BuildShader Passthrough2D11.hlsl PS_PassthroughRGBA2D_5551 ps_4_0_level_9_3 compiled\passthroughrgba2d_5551_11ps.h %debug%
call:BuildShader MultiplyAlpha.hlsl PS_FtoF_PM_RGBA ps_4_0 compiled\multiplyalpha_ftof_pm_rgba_ps.h %debug%
call:BuildShader MultiplyAlpha.hlsl PS_FtoF_UM_RGBA ps_4_0 compiled\multiplyalpha_ftof_um_rgba_ps.h %debug%
call:BuildShader MultiplyAlpha.hlsl PS_FtoF_PM_RGB ps_4_0 compiled\multiplyalpha_ftof_pm_rgb_ps.h %debug%
......@@ -46,6 +50,13 @@ call:BuildShader MultiplyAlpha.hlsl PS_FtoF_UM_LUMA ps_4_0 compiled\multiplyalph
call:BuildShader MultiplyAlpha.hlsl PS_FtoF_PM_LUMAALPHA ps_4_0 compiled\multiplyalpha_ftof_pm_lumaalpha_ps.h %debug%
call:BuildShader MultiplyAlpha.hlsl PS_FtoF_UM_LUMAALPHA ps_4_0 compiled\multiplyalpha_ftof_um_lumaalpha_ps.h %debug%
call:BuildShader MultiplyAlpha.hlsl PS_FtoF_PM_RGBA_4444 ps_4_0 compiled\multiplyalpha_ftof_pm_rgba_4444_ps.h %debug%
call:BuildShader MultiplyAlpha.hlsl PS_FtoF_UM_RGBA_4444 ps_4_0 compiled\multiplyalpha_ftof_um_rgba_4444_ps.h %debug%
call:BuildShader MultiplyAlpha.hlsl PS_FtoF_PM_RGB_565 ps_4_0 compiled\multiplyalpha_ftof_pm_rgb_565_ps.h %debug%
call:BuildShader MultiplyAlpha.hlsl PS_FtoF_UM_RGB_565 ps_4_0 compiled\multiplyalpha_ftof_um_rgb_565_ps.h %debug%
call:BuildShader MultiplyAlpha.hlsl PS_FtoF_PM_RGBA_5551 ps_4_0 compiled\multiplyalpha_ftof_pm_rgba_5551_ps.h %debug%
call:BuildShader MultiplyAlpha.hlsl PS_FtoF_UM_RGBA_5551 ps_4_0 compiled\multiplyalpha_ftof_um_rgba_5551_ps.h %debug%
call:BuildShader Clear11.hlsl VS_Clear_FL9 vs_4_0_level_9_3 compiled\clear11_fl9vs.h %debug%
call:BuildShader Clear11.hlsl PS_ClearFloat_FL9 ps_4_0_level_9_3 compiled\clearfloat11_fl9ps.h %debug%
......
......@@ -2555,6 +2555,7 @@ gl::Error Renderer9::copyTexture(const gl::Context *context,
GLint sourceLevel,
const gl::Rectangle &sourceRect,
GLenum destFormat,
GLenum destType,
const gl::Offset &destOffset,
TextureStorage *storage,
GLenum destTarget,
......
......@@ -223,6 +223,7 @@ class Renderer9 : public RendererD3D
GLint sourceLevel,
const gl::Rectangle &sourceRect,
GLenum destFormat,
GLenum destType,
const gl::Offset &destOffset,
TextureStorage *storage,
GLenum destTarget,
......
......@@ -479,19 +479,26 @@
'libANGLE/renderer/d3d/d3d11/shaders/compiled/clearuint11ps6.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/clearuint11ps7.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/clearuint11ps8.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_rgba_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_rgba_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_rgb_565_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_rgb_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_rgba_4444_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_rgba_5551_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_pm_rgba_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_rgb_565_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_rgb_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftou_pm_rgba_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftou_pt_rgba_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftou_um_rgba_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_rgba_4444_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_rgba_5551_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftof_um_rgba_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftou_pm_rgb_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftou_pm_rgba_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftou_pt_rgb_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftou_pt_rgba_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftou_um_rgb_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/multiplyalpha_ftou_um_rgba_ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthrough2d11vs.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthrough3d11gs.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthrough3d11vs.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthrougha2d11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughdepth2d11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughlum2d11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughlum3d11ps.h',
......@@ -510,12 +517,15 @@
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrg3di11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrg3dui11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2d11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2d_565_11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2di11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgb2dui11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3d11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3di11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgb3dui11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2d11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2d_4444_11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2d_5551_11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2di11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba2dui11ps.h',
'libANGLE/renderer/d3d/d3d11/shaders/compiled/passthroughrgba3d11ps.h',
......
......@@ -74,6 +74,51 @@ class CopyTextureTest : public ANGLETest
return true;
}
void testGradientDownsampleUniqueValues(GLenum destFormat,
GLenum destType,
const std::array<size_t, 4> &expectedUniqueValues)
{
std::array<GLColor, 256> sourceGradient;
for (size_t i = 0; i < sourceGradient.size(); i++)
{
GLubyte value = static_cast<GLubyte>(i);
sourceGradient[i] = GLColor(value, value, value, value);
}
GLTexture sourceTexture;
glBindTexture(GL_TEXTURE_2D, sourceTexture);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE,
sourceGradient.data());
GLTexture destTexture;
glBindTexture(GL_TEXTURE_2D, destTexture);
glCopyTextureCHROMIUM(sourceTexture, 0, GL_TEXTURE_2D, destTexture, 0, destFormat, destType,
GL_FALSE, GL_FALSE, GL_FALSE);
EXPECT_GL_NO_ERROR();
GLFramebuffer fbo;
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, destTexture, 0);
std::array<GLColor, 256> destData;
glReadPixels(0, 0, 256, 1, GL_RGBA, GL_UNSIGNED_BYTE, destData.data());
EXPECT_GL_NO_ERROR();
std::set<GLubyte> uniqueValues[4];
for (size_t i = 0; i < destData.size(); i++)
{
GLColor color = destData[i];
uniqueValues[0].insert(color.R);
uniqueValues[1].insert(color.G);
uniqueValues[2].insert(color.B);
uniqueValues[3].insert(color.A);
}
EXPECT_EQ(expectedUniqueValues[0], uniqueValues[0].size());
EXPECT_EQ(expectedUniqueValues[1], uniqueValues[1].size());
EXPECT_EQ(expectedUniqueValues[2], uniqueValues[2].size());
EXPECT_EQ(expectedUniqueValues[3], uniqueValues[3].size());
}
GLuint mTextures[2] = {
0, 0,
};
......@@ -729,6 +774,98 @@ TEST_P(CopyTextureTest, CopyToMipmap)
}
}
// Test that copying from an RGBA8 texture to RGBA4 results in exactly 4-bit precision in the result
TEST_P(CopyTextureTest, DownsampleRGBA4444)
{
// Downsampling on copy is only guarenteed on D3D11
ANGLE_SKIP_TEST_IF(!IsD3D11());
GLTexture textures[2];
GLColor pixels[] = {GLColor(0, 5, 6, 7), GLColor(17, 22, 25, 24), GLColor(34, 35, 36, 36),
GLColor(51, 53, 55, 55)};
glBindTexture(GL_TEXTURE_2D, textures[0]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
glBindTexture(GL_TEXTURE_2D, textures[1]);
glCopyTextureCHROMIUM(textures[0], 0, GL_TEXTURE_2D, textures[1], 0, GL_RGBA,
GL_UNSIGNED_SHORT_4_4_4_4, GL_FALSE, GL_FALSE, GL_FALSE);
GLFramebuffer fbo;
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textures[1], 0);
EXPECT_PIXEL_COLOR_NEAR(0, 0, GLColor(0, 0, 0, 0), 1.0);
EXPECT_PIXEL_COLOR_NEAR(1, 0, GLColor(17, 17, 17, 17), 1.0);
EXPECT_PIXEL_COLOR_NEAR(0, 1, GLColor(34, 34, 34, 34), 1.0);
EXPECT_PIXEL_COLOR_NEAR(1, 1, GLColor(51, 51, 51, 51), 1.0);
testGradientDownsampleUniqueValues(GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, {16, 16, 16, 16});
}
// Test that copying from an RGBA8 texture to RGB565 results in exactly 4-bit precision in the
// result
TEST_P(CopyTextureTest, DownsampleRGB565)
{
// Downsampling on copy is only guarenteed on D3D11
ANGLE_SKIP_TEST_IF(!IsD3D11());
GLTexture textures[2];
GLColor pixels[] = {GLColor(0, 5, 2, 14), GLColor(17, 22, 25, 30), GLColor(34, 33, 36, 46),
GLColor(50, 54, 49, 60)};
glBindTexture(GL_TEXTURE_2D, textures[0]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
glBindTexture(GL_TEXTURE_2D, textures[1]);
glCopyTextureCHROMIUM(textures[0], 0, GL_TEXTURE_2D, textures[1], 0, GL_RGB,
GL_UNSIGNED_SHORT_5_6_5, GL_FALSE, GL_FALSE, GL_FALSE);
GLFramebuffer fbo;
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textures[1], 0);
EXPECT_PIXEL_COLOR_NEAR(0, 0, GLColor(0, 4, 0, 255), 1.0);
EXPECT_PIXEL_COLOR_NEAR(1, 0, GLColor(16, 20, 25, 255), 1.0);
EXPECT_PIXEL_COLOR_NEAR(0, 1, GLColor(33, 32, 33, 255), 1.0);
EXPECT_PIXEL_COLOR_NEAR(1, 1, GLColor(49, 53, 49, 255), 1.0);
testGradientDownsampleUniqueValues(GL_RGB, GL_UNSIGNED_SHORT_5_6_5, {32, 64, 32, 1});
}
// Test that copying from an RGBA8 texture to RGBA5551 results in exactly 4-bit precision in the
// result
TEST_P(CopyTextureTest, DownsampleRGBA5551)
{
// Downsampling on copy is only guarenteed on D3D11
ANGLE_SKIP_TEST_IF(!IsD3D11());
GLTexture textures[2];
GLColor pixels[] = {GLColor(0, 1, 2, 3), GLColor(14, 16, 17, 18), GLColor(33, 34, 36, 46),
GLColor(50, 51, 52, 255)};
glBindTexture(GL_TEXTURE_2D, textures[0]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
glBindTexture(GL_TEXTURE_2D, textures[1]);
glCopyTextureCHROMIUM(textures[0], 0, GL_TEXTURE_2D, textures[1], 0, GL_RGBA,
GL_UNSIGNED_SHORT_5_5_5_1, GL_FALSE, GL_FALSE, GL_FALSE);
GLFramebuffer fbo;
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textures[1], 0);
EXPECT_PIXEL_COLOR_NEAR(0, 0, GLColor(0, 0, 0, 0), 1.0);
EXPECT_PIXEL_COLOR_NEAR(1, 0, GLColor(16, 16, 16, 0), 1.0);
EXPECT_PIXEL_COLOR_NEAR(0, 1, GLColor(33, 33, 33, 0), 1.0);
EXPECT_PIXEL_COLOR_NEAR(1, 1, GLColor(49, 49, 49, 255), 1.0);
testGradientDownsampleUniqueValues(GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, {32, 32, 32, 2});
}
// Test to ensure that CopyTexture works with LUMINANCE texture as a destination
TEST_P(CopyTextureTestDest, Luminance)
{
......
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