Commit 24112d68 by Jamie Madill

Only use 4-channel shaders for unpack buffers.

D3D11 supports sampling other channel sizes of backing object and declaring them as 4-vectors in HLSL. This allows us to simplify the logic for fast unpack shaders significantly. Source: http://msdn.microsoft.com/en-us/library/windows/desktop/bb509700(v=vs.85).aspx (Default Values for Missing Components in a Texture) Change-Id: I7f645372f266f57bd94cdb1c795f1d30bf2a60a4 Reviewed-on: https://chromium-review.googlesource.com/181901Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent c30003d6
...@@ -28,26 +28,10 @@ ...@@ -28,26 +28,10 @@
#include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4f.h" #include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4f.h"
#include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4i.h" #include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4i.h"
#include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4ui.h" #include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4ui.h"
#include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_2f.h"
#include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_2i.h"
#include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_2ui.h"
#include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_1f.h"
#include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_1i.h"
#include "libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_1ui.h"
namespace rx namespace rx
{ {
bool PixelTransfer11::CopyShaderDesc::operator<(const CopyShaderDesc &other) const
{
if (mSignedInteger != other.mSignedInteger)
{
return mSignedInteger;
}
return mSourceFormat < other.mSourceFormat;
}
PixelTransfer11::PixelTransfer11(Renderer11 *renderer) PixelTransfer11::PixelTransfer11(Renderer11 *renderer)
: mRenderer(renderer), : mRenderer(renderer),
mBufferToTextureVS(NULL), mBufferToTextureVS(NULL),
...@@ -242,44 +226,26 @@ bool PixelTransfer11::copyBufferToTexture(const gl::PixelUnpackState &unpack, un ...@@ -242,44 +226,26 @@ bool PixelTransfer11::copyBufferToTexture(const gl::PixelUnpackState &unpack, un
return true; return true;
} }
void PixelTransfer11::addBufferToTextureShader(GLenum sourceFormat, bool signedInteger, ID3D11PixelShader *pixelShader)
{
ASSERT(pixelShader);
CopyShaderDesc shaderDesc = { 0 };
shaderDesc.mSourceFormat = sourceFormat;
shaderDesc.mSignedInteger = signedInteger;
ASSERT(mBufferToTexturePSMap.count(shaderDesc) == 0);
mBufferToTexturePSMap[shaderDesc] = pixelShader;
}
void PixelTransfer11::buildShaderMap() void PixelTransfer11::buildShaderMap()
{ {
ID3D11Device *device = mRenderer->getDevice(); ID3D11Device *device = mRenderer->getDevice();
addBufferToTextureShader(GL_RGBA, false, d3d11::CompilePS(device, g_PS_BufferToTexture_4F, "BufferToTexture RGBA ps")); mBufferToTexturePSMap[GL_FLOAT] = d3d11::CompilePS(device, g_PS_BufferToTexture_4F, "BufferToTexture RGBA ps");
addBufferToTextureShader(GL_RG, false, d3d11::CompilePS(device, g_PS_BufferToTexture_2F, "BufferToTexture RG ps")); mBufferToTexturePSMap[GL_INT] = d3d11::CompilePS(device, g_PS_BufferToTexture_4I, "BufferToTexture RGBA-I ps");
addBufferToTextureShader(GL_RED, false, d3d11::CompilePS(device, g_PS_BufferToTexture_1F, "BufferToTexture R ps")); mBufferToTexturePSMap[GL_UNSIGNED_INT] = d3d11::CompilePS(device, g_PS_BufferToTexture_4UI, "BufferToTexture RGBA-UI ps");
addBufferToTextureShader(GL_RGBA_INTEGER, true, d3d11::CompilePS(device, g_PS_BufferToTexture_4I, "BufferToTexture RGBA-I ps"));
addBufferToTextureShader(GL_RG_INTEGER, true, d3d11::CompilePS(device, g_PS_BufferToTexture_2I, "BufferToTexture RG-I ps"));
addBufferToTextureShader(GL_RED_INTEGER, true, d3d11::CompilePS(device, g_PS_BufferToTexture_1I, "BufferToTexture R-I ps"));
addBufferToTextureShader(GL_RGBA_INTEGER, false, d3d11::CompilePS(device, g_PS_BufferToTexture_4UI, "BufferToTexture RGBA-UI ps"));
addBufferToTextureShader(GL_RG_INTEGER, false, d3d11::CompilePS(device, g_PS_BufferToTexture_2UI, "BufferToTexture RG-UI ps"));
addBufferToTextureShader(GL_RED_INTEGER, false, d3d11::CompilePS(device, g_PS_BufferToTexture_1UI, "BufferToTexture R-UI ps"));
} }
ID3D11PixelShader *PixelTransfer11::findBufferToTexturePS(GLenum internalFormat) const ID3D11PixelShader *PixelTransfer11::findBufferToTexturePS(GLenum internalFormat) const
{ {
int clientVersion = mRenderer->getCurrentClientVersion(); int clientVersion = mRenderer->getCurrentClientVersion();
GLenum componentType = gl::GetComponentType(internalFormat, clientVersion);
CopyShaderDesc shaderDesc = { 0 }; if (componentType == GL_SIGNED_NORMALIZED || componentType == GL_UNSIGNED_NORMALIZED)
shaderDesc.mSourceFormat = gl::GetFormat(internalFormat, clientVersion); {
shaderDesc.mSignedInteger = (gl::GetComponentType(internalFormat, clientVersion) == GL_INT); componentType = GL_FLOAT;
}
auto shaderMapIt = mBufferToTexturePSMap.find(shaderDesc);
auto shaderMapIt = mBufferToTexturePSMap.find(componentType);
return (shaderMapIt == mBufferToTexturePSMap.end() ? NULL : shaderMapIt->second); return (shaderMapIt == mBufferToTexturePSMap.end() ? NULL : shaderMapIt->second);
} }
......
...@@ -44,15 +44,6 @@ class PixelTransfer11 ...@@ -44,15 +44,6 @@ class PixelTransfer11
private: private:
struct CopyShaderDesc
{
GLenum mSourceFormat;
bool mSignedInteger;
// For sorting keys in a std::map
bool operator<(const CopyShaderDesc &other) const;
};
struct CopyShaderParams struct CopyShaderParams
{ {
unsigned int FirstPixelOffset; unsigned int FirstPixelOffset;
...@@ -68,13 +59,12 @@ class PixelTransfer11 ...@@ -68,13 +59,12 @@ class PixelTransfer11
static void setBufferToTextureCopyParams(const gl::Box &destArea, const gl::Extents &destSize, GLenum internalFormat, static void setBufferToTextureCopyParams(const gl::Box &destArea, const gl::Extents &destSize, GLenum internalFormat,
const gl::PixelUnpackState &unpack, unsigned int offset, CopyShaderParams *parametersOut); const gl::PixelUnpackState &unpack, unsigned int offset, CopyShaderParams *parametersOut);
void addBufferToTextureShader(GLenum sourceFormat, bool signedInteger, ID3D11PixelShader *pixelShader);
void buildShaderMap(); void buildShaderMap();
ID3D11PixelShader *findBufferToTexturePS(GLenum internalFormat) const; ID3D11PixelShader *findBufferToTexturePS(GLenum internalFormat) const;
Renderer11 *mRenderer; Renderer11 *mRenderer;
std::map<CopyShaderDesc, ID3D11PixelShader *> mBufferToTexturePSMap; std::map<GLenum, ID3D11PixelShader *> mBufferToTexturePSMap;
ID3D11VertexShader *mBufferToTextureVS; ID3D11VertexShader *mBufferToTextureVS;
ID3D11GeometryShader *mBufferToTextureGS; ID3D11GeometryShader *mBufferToTextureGS;
ID3D11Buffer *mParamsConstantBuffer; ID3D11Buffer *mParamsConstantBuffer;
......
Buffer<float4> Buffer4F : register(t0); Buffer<float4> Buffer4F : register(t0);
Buffer<float2> Buffer2F : register(t0);
Buffer<float1> Buffer1F : register(t0);
Buffer<int4> Buffer4I : register(t0); Buffer<int4> Buffer4I : register(t0);
Buffer<int2> Buffer2I : register(t0);
Buffer<int1> Buffer1I : register(t0);
Buffer<uint4> Buffer4UI : register(t0); Buffer<uint4> Buffer4UI : register(t0);
Buffer<uint2> Buffer2UI : register(t0);
Buffer<uint1> Buffer1UI : register(t0);
struct VS_OUTPUT struct VS_OUTPUT
{ {
...@@ -73,42 +65,12 @@ float4 PS_BufferToTexture_4F(in float4 inPosition : SV_Position, in uint inIndex ...@@ -73,42 +65,12 @@ float4 PS_BufferToTexture_4F(in float4 inPosition : SV_Position, in uint inIndex
return Buffer4F.Load(inIndex); return Buffer4F.Load(inIndex);
} }
float2 PS_BufferToTexture_2F(in float4 inPosition : SV_Position, in uint inIndex : TEXCOORD0) : SV_Target
{
return Buffer2F.Load(inIndex);
}
float1 PS_BufferToTexture_1F(in float4 inPosition : SV_Position, in uint inIndex : TEXCOORD0) : SV_Target
{
return Buffer1F.Load(inIndex);
}
int4 PS_BufferToTexture_4I(in float4 inPosition : SV_Position, in uint inIndex : TEXCOORD0) : SV_Target int4 PS_BufferToTexture_4I(in float4 inPosition : SV_Position, in uint inIndex : TEXCOORD0) : SV_Target
{ {
return Buffer4I.Load(inIndex); return Buffer4I.Load(inIndex);
} }
int2 PS_BufferToTexture_2I(in float4 inPosition : SV_Position, in uint inIndex : TEXCOORD0) : SV_Target
{
return Buffer2I.Load(inIndex);
}
int1 PS_BufferToTexture_1I(in float4 inPosition : SV_Position, in uint inIndex : TEXCOORD0) : SV_Target
{
return Buffer1I.Load(inIndex);
}
uint4 PS_BufferToTexture_4UI(in float4 inPosition : SV_Position, in uint inIndex : TEXCOORD0) : SV_Target uint4 PS_BufferToTexture_4UI(in float4 inPosition : SV_Position, in uint inIndex : TEXCOORD0) : SV_Target
{ {
return Buffer4UI.Load(inIndex); return Buffer4UI.Load(inIndex);
} }
uint2 PS_BufferToTexture_2UI(in float4 inPosition : SV_Position, in uint inIndex : TEXCOORD0) : SV_Target
{
return Buffer2UI.Load(inIndex);
}
uint1 PS_BufferToTexture_1UI(in float4 inPosition : SV_Position, in uint inIndex : TEXCOORD0) : SV_Target
{
return Buffer1UI.Load(inIndex);
}
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
//
//
///
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Buffer1F texture float buf 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float
// TEXCOORD 0 x 1 NONE uint x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 x 0 TARGET float x
//
ps_4_0
dcl_resource_buffer (float,float,float,float) t0
dcl_input_ps constant v1.x
dcl_output o0.x
dcl_temps 1
ld r0.xyzw, v1.xxxx, t0.xyzw
mov o0.x, r0.x
ret
// Approximately 3 instruction slots used
#endif
const BYTE g_PS_BufferToTexture_1F[] =
{
68, 88, 66, 67, 76, 198,
244, 235, 47, 84, 19, 164,
9, 95, 241, 125, 8, 153,
121, 91, 1, 0, 0, 0,
48, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
180, 0, 0, 0, 12, 1,
0, 0, 64, 1, 0, 0,
180, 1, 0, 0, 82, 68,
69, 70, 120, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
28, 0, 0, 0, 0, 4,
255, 255, 0, 1, 0, 0,
69, 0, 0, 0, 60, 0,
0, 0, 2, 0, 0, 0,
5, 0, 0, 0, 1, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
66, 117, 102, 102, 101, 114,
49, 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, 57, 46, 51, 48,
46, 57, 50, 48, 48, 46,
49, 54, 51, 56, 52, 0,
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, 1, 0,
0, 0, 1, 0, 0, 0,
1, 1, 0, 0, 83, 86,
95, 80, 111, 115, 105, 116,
105, 111, 110, 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, 1, 14,
0, 0, 83, 86, 95, 84,
97, 114, 103, 101, 116, 0,
171, 171, 83, 72, 68, 82,
108, 0, 0, 0, 64, 0,
0, 0, 27, 0, 0, 0,
88, 8, 0, 4, 0, 112,
16, 0, 0, 0, 0, 0,
85, 85, 0, 0, 98, 8,
0, 3, 18, 16, 16, 0,
1, 0, 0, 0, 101, 0,
0, 3, 18, 32, 16, 0,
0, 0, 0, 0, 104, 0,
0, 2, 1, 0, 0, 0,
45, 0, 0, 7, 242, 0,
16, 0, 0, 0, 0, 0,
6, 16, 16, 0, 1, 0,
0, 0, 70, 126, 16, 0,
0, 0, 0, 0, 54, 0,
0, 5, 18, 32, 16, 0,
0, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 116, 0, 0, 0,
3, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
2, 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,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 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,
0, 0, 0, 0, 0, 0,
0, 0
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
//
//
///
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Buffer1I texture sint buf 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float
// TEXCOORD 0 x 1 NONE uint x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 x 0 TARGET int x
//
ps_4_0
dcl_resource_buffer (sint,sint,sint,sint) t0
dcl_input_ps constant v1.x
dcl_output o0.x
dcl_temps 1
ld r0.xyzw, v1.xxxx, t0.xyzw
mov o0.x, r0.x
ret
// Approximately 3 instruction slots used
#endif
const BYTE g_PS_BufferToTexture_1I[] =
{
68, 88, 66, 67, 135, 250,
39, 245, 129, 20, 191, 147,
124, 250, 60, 63, 82, 82,
7, 107, 1, 0, 0, 0,
48, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
180, 0, 0, 0, 12, 1,
0, 0, 64, 1, 0, 0,
180, 1, 0, 0, 82, 68,
69, 70, 120, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
28, 0, 0, 0, 0, 4,
255, 255, 0, 1, 0, 0,
69, 0, 0, 0, 60, 0,
0, 0, 2, 0, 0, 0,
3, 0, 0, 0, 1, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
66, 117, 102, 102, 101, 114,
49, 73, 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, 57, 46, 51, 48,
46, 57, 50, 48, 48, 46,
49, 54, 51, 56, 52, 0,
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, 1, 0,
0, 0, 1, 0, 0, 0,
1, 1, 0, 0, 83, 86,
95, 80, 111, 115, 105, 116,
105, 111, 110, 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, 2, 0, 0, 0,
0, 0, 0, 0, 1, 14,
0, 0, 83, 86, 95, 84,
97, 114, 103, 101, 116, 0,
171, 171, 83, 72, 68, 82,
108, 0, 0, 0, 64, 0,
0, 0, 27, 0, 0, 0,
88, 8, 0, 4, 0, 112,
16, 0, 0, 0, 0, 0,
51, 51, 0, 0, 98, 8,
0, 3, 18, 16, 16, 0,
1, 0, 0, 0, 101, 0,
0, 3, 18, 32, 16, 0,
0, 0, 0, 0, 104, 0,
0, 2, 1, 0, 0, 0,
45, 0, 0, 7, 242, 0,
16, 0, 0, 0, 0, 0,
6, 16, 16, 0, 1, 0,
0, 0, 70, 126, 16, 0,
0, 0, 0, 0, 54, 0,
0, 5, 18, 32, 16, 0,
0, 0, 0, 0, 10, 0,
16, 0, 0, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 116, 0, 0, 0,
3, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
2, 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,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 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,
0, 0, 0, 0, 0, 0,
0, 0
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
//
//
///
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Buffer1UI texture uint buf 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float
// TEXCOORD 0 x 1 NONE uint x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 x 0 TARGET uint x
//
ps_4_0
dcl_resource_buffer (uint,uint,uint,uint) t0
dcl_input_ps constant v1.x
dcl_output o0.x
dcl_temps 1
ld r0.xyzw, v1.xxxx, t0.xyzw
mov o0.x, r0.x
ret
// Approximately 3 instruction slots used
#endif
const BYTE g_PS_BufferToTexture_1UI[] =
{
68, 88, 66, 67, 62, 184,
65, 1, 157, 198, 242, 80,
6, 77, 102, 77, 44, 20,
65, 91, 1, 0, 0, 0,
52, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
184, 0, 0, 0, 16, 1,
0, 0, 68, 1, 0, 0,
184, 1, 0, 0, 82, 68,
69, 70, 124, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
28, 0, 0, 0, 0, 4,
255, 255, 0, 1, 0, 0,
70, 0, 0, 0, 60, 0,
0, 0, 2, 0, 0, 0,
4, 0, 0, 0, 1, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0,
66, 117, 102, 102, 101, 114,
49, 85, 73, 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, 57, 46, 51,
48, 46, 57, 50, 48, 48,
46, 49, 54, 51, 56, 52,
0, 171, 171, 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, 1, 0, 0, 0,
1, 0, 0, 0, 1, 1,
0, 0, 83, 86, 95, 80,
111, 115, 105, 116, 105, 111,
110, 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,
1, 0, 0, 0, 0, 0,
0, 0, 1, 14, 0, 0,
83, 86, 95, 84, 97, 114,
103, 101, 116, 0, 171, 171,
83, 72, 68, 82, 108, 0,
0, 0, 64, 0, 0, 0,
27, 0, 0, 0, 88, 8,
0, 4, 0, 112, 16, 0,
0, 0, 0, 0, 68, 68,
0, 0, 98, 8, 0, 3,
18, 16, 16, 0, 1, 0,
0, 0, 101, 0, 0, 3,
18, 32, 16, 0, 0, 0,
0, 0, 104, 0, 0, 2,
1, 0, 0, 0, 45, 0,
0, 7, 242, 0, 16, 0,
0, 0, 0, 0, 6, 16,
16, 0, 1, 0, 0, 0,
70, 126, 16, 0, 0, 0,
0, 0, 54, 0, 0, 5,
18, 32, 16, 0, 0, 0,
0, 0, 10, 0, 16, 0,
0, 0, 0, 0, 62, 0,
0, 1, 83, 84, 65, 84,
116, 0, 0, 0, 3, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 2, 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, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 2, 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, 0, 0,
0, 0, 0, 0, 0, 0
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
//
//
///
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Buffer2F texture float2 buf 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float
// TEXCOORD 0 x 1 NONE uint x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xy 0 TARGET float xy
//
ps_4_0
dcl_resource_buffer (float,float,float,float) t0
dcl_input_ps constant v1.x
dcl_output o0.xy
dcl_temps 1
ld r0.xyzw, v1.xxxx, t0.xyzw
mov o0.xy, r0.xyxx
ret
// Approximately 3 instruction slots used
#endif
const BYTE g_PS_BufferToTexture_2F[] =
{
68, 88, 66, 67, 215, 105,
209, 227, 38, 90, 225, 40,
251, 250, 109, 34, 8, 5,
162, 19, 1, 0, 0, 0,
48, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
180, 0, 0, 0, 12, 1,
0, 0, 64, 1, 0, 0,
180, 1, 0, 0, 82, 68,
69, 70, 120, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
28, 0, 0, 0, 0, 4,
255, 255, 0, 1, 0, 0,
69, 0, 0, 0, 60, 0,
0, 0, 2, 0, 0, 0,
5, 0, 0, 0, 1, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 1, 0,
0, 0, 5, 0, 0, 0,
66, 117, 102, 102, 101, 114,
50, 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, 57, 46, 51, 48,
46, 57, 50, 48, 48, 46,
49, 54, 51, 56, 52, 0,
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, 1, 0,
0, 0, 1, 0, 0, 0,
1, 1, 0, 0, 83, 86,
95, 80, 111, 115, 105, 116,
105, 111, 110, 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, 3, 12,
0, 0, 83, 86, 95, 84,
97, 114, 103, 101, 116, 0,
171, 171, 83, 72, 68, 82,
108, 0, 0, 0, 64, 0,
0, 0, 27, 0, 0, 0,
88, 8, 0, 4, 0, 112,
16, 0, 0, 0, 0, 0,
85, 85, 0, 0, 98, 8,
0, 3, 18, 16, 16, 0,
1, 0, 0, 0, 101, 0,
0, 3, 50, 32, 16, 0,
0, 0, 0, 0, 104, 0,
0, 2, 1, 0, 0, 0,
45, 0, 0, 7, 242, 0,
16, 0, 0, 0, 0, 0,
6, 16, 16, 0, 1, 0,
0, 0, 70, 126, 16, 0,
0, 0, 0, 0, 54, 0,
0, 5, 50, 32, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 116, 0, 0, 0,
3, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
2, 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,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 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,
0, 0, 0, 0, 0, 0,
0, 0
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
//
//
///
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Buffer2I texture sint2 buf 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float
// TEXCOORD 0 x 1 NONE uint x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xy 0 TARGET int xy
//
ps_4_0
dcl_resource_buffer (sint,sint,sint,sint) t0
dcl_input_ps constant v1.x
dcl_output o0.xy
dcl_temps 1
ld r0.xyzw, v1.xxxx, t0.xyzw
mov o0.xy, r0.xyxx
ret
// Approximately 3 instruction slots used
#endif
const BYTE g_PS_BufferToTexture_2I[] =
{
68, 88, 66, 67, 190, 82,
226, 218, 75, 161, 187, 203,
140, 113, 25, 244, 212, 196,
60, 121, 1, 0, 0, 0,
48, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
180, 0, 0, 0, 12, 1,
0, 0, 64, 1, 0, 0,
180, 1, 0, 0, 82, 68,
69, 70, 120, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
28, 0, 0, 0, 0, 4,
255, 255, 0, 1, 0, 0,
69, 0, 0, 0, 60, 0,
0, 0, 2, 0, 0, 0,
3, 0, 0, 0, 1, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 1, 0,
0, 0, 5, 0, 0, 0,
66, 117, 102, 102, 101, 114,
50, 73, 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, 57, 46, 51, 48,
46, 57, 50, 48, 48, 46,
49, 54, 51, 56, 52, 0,
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, 1, 0,
0, 0, 1, 0, 0, 0,
1, 1, 0, 0, 83, 86,
95, 80, 111, 115, 105, 116,
105, 111, 110, 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, 2, 0, 0, 0,
0, 0, 0, 0, 3, 12,
0, 0, 83, 86, 95, 84,
97, 114, 103, 101, 116, 0,
171, 171, 83, 72, 68, 82,
108, 0, 0, 0, 64, 0,
0, 0, 27, 0, 0, 0,
88, 8, 0, 4, 0, 112,
16, 0, 0, 0, 0, 0,
51, 51, 0, 0, 98, 8,
0, 3, 18, 16, 16, 0,
1, 0, 0, 0, 101, 0,
0, 3, 50, 32, 16, 0,
0, 0, 0, 0, 104, 0,
0, 2, 1, 0, 0, 0,
45, 0, 0, 7, 242, 0,
16, 0, 0, 0, 0, 0,
6, 16, 16, 0, 1, 0,
0, 0, 70, 126, 16, 0,
0, 0, 0, 0, 54, 0,
0, 5, 50, 32, 16, 0,
0, 0, 0, 0, 70, 0,
16, 0, 0, 0, 0, 0,
62, 0, 0, 1, 83, 84,
65, 84, 116, 0, 0, 0,
3, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0,
2, 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,
1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 2, 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,
0, 0, 0, 0, 0, 0,
0, 0
};
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
//
//
///
// Resource Bindings:
//
// Name Type Format Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// Buffer2UI texture uint2 buf 0 1
//
//
//
// Input signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position 0 xyzw 0 POS float
// TEXCOORD 0 x 1 NONE uint x
//
//
// Output signature:
//
// Name Index Mask Register SysValue Format Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target 0 xy 0 TARGET uint xy
//
ps_4_0
dcl_resource_buffer (uint,uint,uint,uint) t0
dcl_input_ps constant v1.x
dcl_output o0.xy
dcl_temps 1
ld r0.xyzw, v1.xxxx, t0.xyzw
mov o0.xy, r0.xyxx
ret
// Approximately 3 instruction slots used
#endif
const BYTE g_PS_BufferToTexture_2UI[] =
{
68, 88, 66, 67, 59, 9,
83, 207, 207, 103, 180, 104,
7, 20, 39, 245, 231, 4,
73, 166, 1, 0, 0, 0,
52, 2, 0, 0, 5, 0,
0, 0, 52, 0, 0, 0,
184, 0, 0, 0, 16, 1,
0, 0, 68, 1, 0, 0,
184, 1, 0, 0, 82, 68,
69, 70, 124, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0,
28, 0, 0, 0, 0, 4,
255, 255, 0, 1, 0, 0,
70, 0, 0, 0, 60, 0,
0, 0, 2, 0, 0, 0,
4, 0, 0, 0, 1, 0,
0, 0, 255, 255, 255, 255,
0, 0, 0, 0, 1, 0,
0, 0, 5, 0, 0, 0,
66, 117, 102, 102, 101, 114,
50, 85, 73, 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, 57, 46, 51,
48, 46, 57, 50, 48, 48,
46, 49, 54, 51, 56, 52,
0, 171, 171, 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, 1, 0, 0, 0,
1, 0, 0, 0, 1, 1,
0, 0, 83, 86, 95, 80,
111, 115, 105, 116, 105, 111,
110, 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,
1, 0, 0, 0, 0, 0,
0, 0, 3, 12, 0, 0,
83, 86, 95, 84, 97, 114,
103, 101, 116, 0, 171, 171,
83, 72, 68, 82, 108, 0,
0, 0, 64, 0, 0, 0,
27, 0, 0, 0, 88, 8,
0, 4, 0, 112, 16, 0,
0, 0, 0, 0, 68, 68,
0, 0, 98, 8, 0, 3,
18, 16, 16, 0, 1, 0,
0, 0, 101, 0, 0, 3,
50, 32, 16, 0, 0, 0,
0, 0, 104, 0, 0, 2,
1, 0, 0, 0, 45, 0,
0, 7, 242, 0, 16, 0,
0, 0, 0, 0, 6, 16,
16, 0, 1, 0, 0, 0,
70, 126, 16, 0, 0, 0,
0, 0, 54, 0, 0, 5,
50, 32, 16, 0, 0, 0,
0, 0, 70, 0, 16, 0,
0, 0, 0, 0, 62, 0,
0, 1, 83, 84, 65, 84,
116, 0, 0, 0, 3, 0,
0, 0, 1, 0, 0, 0,
0, 0, 0, 0, 2, 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, 1, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 2, 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, 0, 0,
0, 0, 0, 0, 0, 0
};
...@@ -79,14 +79,8 @@ call:BuildShader Clear11.hlsl PS_ClearSint ps_4_0 compiled\c ...@@ -79,14 +79,8 @@ call:BuildShader Clear11.hlsl PS_ClearSint ps_4_0 compiled\c
call:BuildShader BufferToTexture11.hlsl VS_BufferToTexture vs_4_0 compiled/buffertotexture11_vs.h %debug% call:BuildShader BufferToTexture11.hlsl VS_BufferToTexture vs_4_0 compiled/buffertotexture11_vs.h %debug%
call:BuildShader BufferToTexture11.hlsl GS_BufferToTexture gs_4_0 compiled/buffertotexture11_gs.h %debug% call:BuildShader BufferToTexture11.hlsl GS_BufferToTexture gs_4_0 compiled/buffertotexture11_gs.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_4F ps_4_0 compiled/buffertotexture11_ps_4f.h %debug% call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_4F ps_4_0 compiled/buffertotexture11_ps_4f.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_2F ps_4_0 compiled/buffertotexture11_ps_2f.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_1F ps_4_0 compiled/buffertotexture11_ps_1f.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_4I ps_4_0 compiled/buffertotexture11_ps_4i.h %debug% call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_4I ps_4_0 compiled/buffertotexture11_ps_4i.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_2I ps_4_0 compiled/buffertotexture11_ps_2i.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_1I ps_4_0 compiled/buffertotexture11_ps_1i.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_4UI ps_4_0 compiled/buffertotexture11_ps_4ui.h %debug% call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_4UI ps_4_0 compiled/buffertotexture11_ps_4ui.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_2UI ps_4_0 compiled/buffertotexture11_ps_2ui.h %debug%
call:BuildShader BufferToTexture11.hlsl PS_BufferToTexture_1UI ps_4_0 compiled/buffertotexture11_ps_1ui.h %debug%
echo. echo.
......
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