Sign in to follow this  
Kamil9132

DX11 Directx 11 instancing

Recommended Posts

Hi,
I want to draw 50 000 cubes using instance drawing.
I tried make it in this way, but there is no object on scene:
 
Efekty.fx
Texture2D txDiffuse : register( t0 );
SamplerState samLinear : register( s0 );

cbuffer cbNeverChanges : register( b0 )
{
	matrix View;
};

cbuffer cbChangeOnResize : register( b1 )
{
    matrix Projection;
};

cbuffer cbChangesEveryFrame : register( b2 )
{
    matrix World;
	bool cPrzez;
	int kolorP;
};

cbuffer cbPixelShader : register( b3 )
{
	float4 kolorS;
	float4 kolorL;

};

//--------------------------------------------------------------------------------------
struct VS_INPUT
{
    float4 Pos : POSITION;
    float2 Tex : TEXCOORD0;
};

struct PS_INPUT
{
    float4 Pos : SV_POSITION;
    float2 Tex : TEXCOORD0;
};

struct VS_INS_INPUT
{
    float4 Pos : POSITION;
    float2 Tex : TEXCOORD0;

	row_major matrix instancePos : INSTANCEPOS;
	uint instanceID : SV_InstanceID;

};
//--------------------------------------------------------------------------------------
// Vertex Shader
//--------------------------------------------------------------------------------------
PS_INPUT VS( VS_INPUT input )
{
    PS_INPUT output = (PS_INPUT)0;
    output.Pos = mul( input.Pos, World );
    output.Pos = mul( output.Pos, View );
    output.Pos = mul( output.Pos, Projection );
    output.Tex = input.Tex;
    
    return output;
}

PS_INPUT VS_INS( VS_INS_INPUT input ){
   
	PS_INPUT output = (PS_INPUT)0;
    output.Pos = mul( input.Pos, input.instancePos );
    output.Pos = mul( output.Pos, View );
    output.Pos = mul( output.Pos, Projection );
    output.Tex = input.Tex;
    
    return output;
}
//--------------------------------------------------------------------------------------
// Pixel Shader
//--------------------------------------------------------------------------------------


float4 PS( PS_INPUT input) : SV_Target{

	float4 diffuse = txDiffuse.Sample( samLinear, input.Tex ) * kolorP / 100 + kolorS + kolorL;

	if (cPrzez){

		clip(diffuse.a < 0.5f ? -1:1);

	}

	return diffuse;

}

main.cpp

ID3D11InputLayout*                  IN_g_pVertexLayout = NULL;
ID3D11Buffer*                       IN_g_pVertexBuffer[2];
ID3D11VertexShader*                 IN_g_pVertexShader = NULL;
ID3D11Buffer*                       IN_g_pInstanceVertexBuffer;

struct INS{

	XMFLOAT4X4 IN_N;

};

std::vector <INS> InstancV;
	ID3DBlob* IN_pVSBlob = NULL;
	D3DX11CompileFromFile( L"Efekty.fx", NULL, NULL, "VS_INS", "vs_4_0", 0, 0, NULL, &IN_pVSBlob, 0, NULL );
	d3d11Device->CreateVertexShader( IN_pVSBlob->GetBufferPointer(), IN_pVSBlob->GetBufferSize(), NULL, &IN_g_pVertexShader );

    D3D11_INPUT_ELEMENT_DESC layoutWW[] =
    {
        { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
        { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
		
		{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 1, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 16, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 2, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 32, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 3, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 48, D3D11_INPUT_PER_INSTANCE_DATA, 1 }

    };
    UINT numElementsWW = ARRAYSIZE( layoutWW );


	d3d11Device->CreateInputLayout (layoutWW, numElementsWW, IN_pVSBlob->GetBufferPointer(),  IN_pVSBlob->GetBufferSize(), &IN_g_pVertexLayout);
    IN_pVSBlob->Release();
	
	IN_g_pVertexBuffer[0] = g_pVertexBuffer;
	IN_g_pVertexBuffer[1] = IN_g_pInstanceVertexBuffer;
XMMATRIX WSG;
INS WSF;
for (short int TB_01 = 0; TB_01 < w; TB_01++){

	for (short int TB_02 = 100; TB_02 < 150; TB_02 += 10){

		for (short int TB_03 = 0; TB_03 < w; TB_03++){

			WSG = XMMatrixTranspose (XMMatrixRotationNormal (camUp, 0) * 
				XMMatrixScaling( skala, skala, skala ) * XMMatrixTranslation( 
				static_cast <float> (TB_01 * skala * 2), 
				static_cast <float> (TB_02 * skala * 2),
				static_cast <float> (TB_03 * skala * 2)));
								
			XMStoreFloat4x4 (&WSF.IN_N, WSG);
			InstancV.push_back (WSF);

		}

	}

}
D3D11_BUFFER_DESC bd;
ZeroMemory( &bd, sizeof(bd) );
bd.Usage = D3D11_USAGE_DEFAULT;
bd.ByteWidth = sizeof (INS) * InstancV.size();
bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
bd.CPUAccessFlags = 0;
D3D11_SUBRESOURCE_DATA InitData;
ZeroMemory( &InitData, sizeof(InitData) );
InitData.pSysMem = &InstancV[0];
d3d11Device->CreateBuffer( &bd, &InitData, &IN_g_pInstanceVertexBuffer );

Drawing with instancing (not working):

			UINT strideI[2] = {sizeof(SimpleVertex), sizeof(INS)};
			UINT offsetI[2] = {0,0};

			d3d11DevCon->IASetInputLayout (IN_g_pVertexLayout);
			d3d11DevCon->IASetVertexBuffers( 0, 2, IN_g_pVertexBuffer, strideI, offsetI );	
			d3d11DevCon->VSSetShader( IN_g_pVertexShader, NULL, 0 );

			d3d11DevCon->PSSetShaderResources( 0, 1, &texturaU[0] );

			d3d11DevCon->DrawIndexedInstanced (ModelPK[lModeli + lModeliV + lModeliP + lModeliPV][1], InstancV.size(), ModelPK[lModeli + lModeliV + lModeliP + lModeliPV][0], 0, 0);
 

Drawing without instancing (working):

			UINT stride = sizeof( SimpleVertex );
			UINT offset = 0;

			d3d11DevCon->IASetInputLayout (g_pVertexLayout);
			d3d11DevCon->IASetVertexBuffers( 0, 1, &g_pVertexBuffer, &stride, &offset );	
			d3d11DevCon->VSSetShader( g_pVertexShader, NULL, 0 );
			
			d3d11DevCon->PSSetShaderResources( 0, 1, &texturaU[0] );

			
			for (short int TB_01 = 0; TB_01 < w; TB_01++){

				for (short int TB_02 = 100; TB_02 < 150; TB_02 += 10){

					for (short int TB_03 = 0; TB_03 < w; TB_03++){

						cb.mWorld = XMMatrixTranspose (XMMatrixRotationNormal (camUp, 0) * 
							XMMatrixScaling( skala, skala, skala ) * XMMatrixTranslation( 
							static_cast <float> (TB_01 * skala * 2), 
							static_cast <float> (TB_02 * skala * 2),
							static_cast <float> (TB_03 * skala * 2)));
						
						d3d11DevCon->UpdateSubresource( g_pCBChangesEveryFrame, 0, NULL, &cb, 0, 0 );
						d3d11DevCon->DrawIndexed (ModelPK[lModeli + lModeliV + lModeliP + lModeliPV][1], ModelPK[lModeli + lModeliV + lModeliP + lModeliPV][0], 0);

					}

				}

			}

Edited by Kamil9132

Share this post


Link to post
Share on other sites

I cannot quite remember but i think that it should be:

{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 16, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 32, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 48, D3D11_INPUT_PER_INSTANCE_DATA, 1 }

 

I havent look in depth...

Share this post


Link to post
Share on other sites

I changed it, but it still does not work.

I added also this line:

d3d11DevCon->VSSetShader( IN_g_pVertexShader, NULL, 0 );

Edited by Kamil9132

Share this post


Link to post
Share on other sites

Internally the compiler expands

row_major matrix instancePos : INSTANCEPOS; 

into something like:

float4 instancePos : INSTANCEPOS0;
float4 instancePos : INSTANCEPOS1;
float4 instancePos : INSTANCEPOS2;
float4 instancePos : INSTANCEPOS3;

 
So the input layout should be:

{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 1, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 16, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 2, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 32, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "INSTANCEPOS", 3, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 48, D3D11_INPUT_PER_INSTANCE_DATA, 1 }
Edited by TiagoCosta

Share this post


Link to post
Share on other sites

Not to sound like the old champ.

 

But. Enable the debug layer, look at the messages being sent to you. Anything relevant?

 

EDIT:

 

Im curious, since theres no NULL component in the input layout, what does numElementsWW equal?

Edited by Migi0027

Share this post


Link to post
Share on other sites

numElementsWW is equal to 6

D3D11 WARNING: Live ID3D11Device at 0x00850D84, Refcount: 96 [ STATE_CREATION WARNING #441: LIVE_DEVICE]
D3D11 WARNING: 	Live ID3D11Context at 0x00D40070, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #2097226: LIVE_CONTEXT]
D3D11 WARNING: 	Live ID3DDeviceContextState at 0x00E042A0, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #3145742: LIVE_DEVICECONTEXTSTATE]
D3D11 WARNING: 	Live ID3D11BlendState at 0x00E0A3F4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11DepthStencilState at 0x00E0C96C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING: 	Live ID3D11RasterizerState at 0x00E0D0A4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x00E0E7FC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11Query at 0x00E0EA14, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #438: LIVE_QUERY]
D3D11 WARNING: 	Live IDXGISwapChain at 0x00E0EC30, Refcount: 1 [ STATE_CREATION WARNING #442: LIVE_SWAPCHAIN]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E0F194, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11RenderTargetView at 0x00E100F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #428: LIVE_RENDERTARGETVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E10474, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11DepthStencilView at 0x00E117CC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #429: LIVE_DEPTHSTENCILVIEW]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x00E11B2C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x00E13714, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2E441564, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x00E1799C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x00E1E214, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x00E22F3C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x00E1A2FC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x00E235B4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E65AF04, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E65B83C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E65C77C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E65D764, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E65F9A4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E660104, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E665764, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E665A04, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E667BB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E667E1C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E66CA1C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E66CCBC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E66E3FC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E66E664, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E26A54, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E26CF4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E28284, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E284EC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E29D8C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E2A02C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E2B2F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E2B55C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E2C984, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E2CC24, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E2E8A4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E2EAE4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E303A4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E30644, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E31A3C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E31C7C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E330C4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E33364, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E3511C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E3535C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E367A4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E36A44, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E37F74, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E381B4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E3D56C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E3D80C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E3F214, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x00E3F47C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x00E3FE4C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E442FE4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E44427C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E444544, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E445AA4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E445D7C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E447014, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E4472EC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E44884C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E448B24, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E449DBC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E44A094, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E44B5F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E44B8CC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E44CB64, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E44CE3C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E66C41C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E44E994, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E450E9C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E45113C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E452F74, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E45323C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E4544D4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E45479C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E45FCF4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E45FF94, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46125C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E461524, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E463184, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E463424, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E464BAC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E464E74, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46613C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E466404, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46769C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E467964, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E468BFC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E468EC4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46A15C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E46A424, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46BB54, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E46BDF4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46D0BC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E46D384, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46E61C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E46E8E4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E46FB7C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E46FE44, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E4710DC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E4713A4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E47263C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E472904, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E473B9C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E473E64, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E4750FC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E4753C4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E47665C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11BlendState at 0x2E4768C4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x2E47717C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E4779B4, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E478C44, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E478F14, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E47ABF4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E47AFA4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E47C64C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E47D87C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E47DAEC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2E4CAAB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x2E4C40B4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x2E4C7DB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E4CFC7C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11BlendState at 0x2E4D2974, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x2E402C7C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11RasterizerState at 0x2E4CBEC4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING: 	Live ID3D11DepthStencilState at 0x2E4CD384, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING: 	Live ID3D11GeometryShader at 0x2E4CC00C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #431: LIVE_GEOMETRYSHADER]
D3D11 WARNING: 	Live ID3D11GeometryShader at 0x2E40673C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #431: LIVE_GEOMETRYSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E41017C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2E4103EC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E435D34, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E4D55BC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]




 @iedoc:
    bd.Usage = D3D11_USAGE_IMMUTABLE;
    bd.ByteWidth = sizeof( DWORD ) * Incidesy.size();
    bd.BindFlags = D3D11_BIND_INDEX_BUFFER;
    bd.CPUAccessFlags = 0;
    InitData.pSysMem = &Incidesy[0];
    d3d11Device->CreateBuffer( &bd, &InitData, &g_pIndexBuffer );
    

    // Set index buffer
	d3d11DevCon->IASetIndexBuffer( g_pIndexBuffer, DXGI_FORMAT_R32_UINT, 0 );
 
Drawing cubes without instanced is working properly, so i think, index buffer is set properly.
Incidesy is vector with indexes.
 
 
Full code of function:
    D3D_DRIVER_TYPE driverTypes[] =
    {
        D3D_DRIVER_TYPE_HARDWARE,
        D3D_DRIVER_TYPE_WARP,
        D3D_DRIVER_TYPE_REFERENCE,
    };
    UINT numDriverTypes = ARRAYSIZE( driverTypes );

    D3D_FEATURE_LEVEL featureLevels[] =
    {
        D3D_FEATURE_LEVEL_11_0,
        D3D_FEATURE_LEVEL_10_1,
        D3D_FEATURE_LEVEL_10_0,
    };
    UINT numFeatureLevels = ARRAYSIZE( featureLevels );

    DXGI_SWAP_CHAIN_DESC sd;
    ZeroMemory( &sd, sizeof( sd ) );
    sd.BufferCount = 1;
    sd.BufferDesc.Width = Width;
    sd.BufferDesc.Height = Height;
    sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
    sd.BufferDesc.RefreshRate.Numerator = 60;
    sd.BufferDesc.RefreshRate.Denominator = 1;
    sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
    sd.OutputWindow = hwnd;
    sd.SampleDesc.Count = 1;
    sd.SampleDesc.Quality = 0;
    sd.Windowed = TRUE;

    for( UINT driverTypeIndex = 0; driverTypeIndex < numDriverTypes; driverTypeIndex++ )
    {
        g_driverType = driverTypes[driverTypeIndex];
//		hr = D3D11CreateDeviceAndSwapChain( NULL, g_driverType, NULL, D3D11_CREATE_DEVICE_SINGLETHREADED, featureLevels, numFeatureLevels,
//			D3D11_SDK_VERSION, &sd, &g_pSwapChain, &d3d11Device, &g_featureLevel, &d3d11DevCon );
      
		hr = D3D11CreateDeviceAndSwapChain( NULL, g_driverType, NULL, D3D11_CREATE_DEVICE_DEBUG, featureLevels, numFeatureLevels,
			D3D11_SDK_VERSION, &sd, &g_pSwapChain, &d3d11Device, &g_featureLevel, &d3d11DevCon );

        if (SUCCEEDED (hr))  break;
    }


	d3d11Device->QueryInterface(__uuidof(ID3D11Debug), reinterpret_cast<void**>(&debugDev));
	debugDev->QueryInterface( __uuidof(ID3D11InfoQueue), (void**)&d3dInfoQueue );


    // Create a render target view
    ID3D11Texture2D* pBackBuffer = NULL;
    g_pSwapChain->GetBuffer( 0, __uuidof( ID3D11Texture2D ), ( LPVOID* )&pBackBuffer );


    d3d11Device->CreateRenderTargetView( pBackBuffer, NULL, &g_pRenderTargetView );
    pBackBuffer->Release();


    // Create depth stencil texture
    D3D11_TEXTURE2D_DESC descDepth;
    ZeroMemory( &descDepth, sizeof(descDepth) );
    descDepth.Width = Width;
    descDepth.Height = Height;
    descDepth.MipLevels = 1;
    descDepth.ArraySize = 1;
    descDepth.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
    descDepth.SampleDesc.Count = 1;
    descDepth.SampleDesc.Quality = 0;
    descDepth.Usage = D3D11_USAGE_DEFAULT;
    descDepth.BindFlags = D3D11_BIND_DEPTH_STENCIL;
    descDepth.CPUAccessFlags = 0;
    descDepth.MiscFlags = 0;
	d3d11Device->CreateTexture2D( &descDepth, NULL, &g_pDepthStencil );

    // Create the depth stencil view
    D3D11_DEPTH_STENCIL_VIEW_DESC descDSV;
    ZeroMemory( &descDSV, sizeof(descDSV) );
    descDSV.Format = descDepth.Format;
    descDSV.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
    descDSV.Texture2D.MipSlice = 0;
    d3d11Device->CreateDepthStencilView( g_pDepthStencil, &descDSV, &g_pDepthStencilView );


	d3d11DevCon->OMSetRenderTargets( 1, &g_pRenderTargetView, g_pDepthStencilView );

    // Setup the viewport
    D3D11_VIEWPORT vp;
    vp.Width = (FLOAT)Width;
    vp.Height = (FLOAT)Height;
    vp.MinDepth = 0.0f;
    vp.MaxDepth = 1.0f;
    vp.TopLeftX = 0;
    vp.TopLeftY = 0;
	d3d11DevCon->RSSetViewports( 1, &vp );

    // Compile the vertex shader
    ID3DBlob* pVSBlob = NULL;
	D3DX11CompileFromFile( L"Efekty.fx", NULL, NULL, "VS", "vs_4_0", 0, 0, NULL, &pVSBlob, 0, NULL );


    // Create the vertex shader
	d3d11Device->CreateVertexShader( pVSBlob->GetBufferPointer(), pVSBlob->GetBufferSize(), NULL, &g_pVertexShader );


    // Define the input layout
    D3D11_INPUT_ELEMENT_DESC layout[] =
    {
        { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
        { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },

    };
    UINT numElements = ARRAYSIZE (layout);








	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
   
	ID3DBlob* IN_pVSBlob = NULL;
	D3DX11CompileFromFile( L"Efekty.fx", NULL, NULL, "VS_INS", "vs_4_0", 0, 0, NULL, &IN_pVSBlob, 0, NULL );
	d3d11Device->CreateVertexShader( IN_pVSBlob->GetBufferPointer(), IN_pVSBlob->GetBufferSize(), NULL, &IN_g_pVertexShader );

    D3D11_INPUT_ELEMENT_DESC layoutWW[] =
    {
        { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
        { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 },
		
		{ "INSTANCEPOS", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 1, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 16, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 2, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 32, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
		{ "INSTANCEPOS", 3, DXGI_FORMAT_R32G32B32A32_FLOAT, 1, 48, D3D11_INPUT_PER_INSTANCE_DATA, 1 }

    };
    UINT numElementsWW = ARRAYSIZE( layoutWW );

	pomoc15 = ToString (numElementsWW);
	d3d11Device->CreateInputLayout (layoutWW, numElementsWW, IN_pVSBlob->GetBufferPointer(),  IN_pVSBlob->GetBufferSize(), &IN_g_pVertexLayout);

    IN_pVSBlob->Release();
	
	IN_g_pVertexBuffer[0] = g_pVertexBuffer;
	IN_g_pVertexBuffer[1] = IN_g_pInstanceVertexBuffer;
	
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////






    // Create the input layout
	d3d11Device->CreateInputLayout (layout, numElements, pVSBlob->GetBufferPointer(),  pVSBlob->GetBufferSize(), &g_pVertexLayout);
    pVSBlob->Release();


    // Set the input layout
	d3d11DevCon->IASetInputLayout (g_pVertexLayout);

    // Compile the pixel shader
    ID3DBlob* pPSBlob = NULL;
	D3DX11CompileFromFile (L"Efekty.fx", NULL, NULL, "PS", "ps_4_0", 0, 0, NULL, &pPSBlob, 0, NULL);
 

    // Create the pixel shader
    d3d11Device->CreatePixelShader (pPSBlob->GetBufferPointer(), pPSBlob->GetBufferSize(), NULL, &g_pPixelShader);
    pPSBlob->Release();


    // Create vertex buffer

	std::vector <SimpleVertex> Vertexy;
	std::vector <DWORD> Incidesy;

	WczObj (Vertexy, Incidesy);

    D3D11_BUFFER_DESC bd;
    ZeroMemory( &bd, sizeof(bd) );
	bd.Usage = D3D11_USAGE_IMMUTABLE;
    bd.ByteWidth = sizeof( SimpleVertex ) * Vertexy.size();
    bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
    bd.CPUAccessFlags = 0;
    D3D11_SUBRESOURCE_DATA InitData;
    ZeroMemory( &InitData, sizeof(InitData) );
    InitData.pSysMem = &Vertexy[0];
    d3d11Device->CreateBuffer( &bd, &InitData, &g_pVertexBuffer );
 

    UINT stride = sizeof( SimpleVertex );
    UINT offset = 0;
	d3d11DevCon->IASetVertexBuffers( 0, 1, &g_pVertexBuffer, &stride, &offset );	

    bd.Usage = D3D11_USAGE_IMMUTABLE;
    bd.ByteWidth = sizeof( DWORD ) * Incidesy.size();
    bd.BindFlags = D3D11_BIND_INDEX_BUFFER;
    bd.CPUAccessFlags = 0;
    InitData.pSysMem = &Incidesy[0];
    d3d11Device->CreateBuffer( &bd, &InitData, &g_pIndexBuffer );
    

    // Set index buffer
	d3d11DevCon->IASetIndexBuffer( g_pIndexBuffer, DXGI_FORMAT_R32_UINT, 0 );

    // Set primitive topology
	d3d11DevCon->IASetPrimitiveTopology( D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST );

    // Create the constant buffers
    bd.Usage = D3D11_USAGE_DEFAULT;
    bd.ByteWidth = sizeof(CBNeverChanges);
    bd.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
    bd.CPUAccessFlags = 0;
    d3d11Device->CreateBuffer( &bd, NULL, &g_pCBNeverChanges );
 
    bd.ByteWidth = sizeof(CBChangeOnResize);
    d3d11Device->CreateBuffer( &bd, NULL, &g_pCBChangeOnResize );

    bd.ByteWidth = sizeof(CBPixelShader);
    d3d11Device->CreateBuffer( &bd, NULL, &g_pCBPixelShader );
  
	bd.ByteWidth = sizeof(CBChangesEveryFrame);
    d3d11Device->CreateBuffer( &bd, NULL, &g_pCBChangesEveryFrame );

	std::string ntextur;

	for (int ptextur = 0; ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP + lModeliPV + ltexturIM; ptextur++){

		if (ptextur < ltextur1D){

			if (ptextur < 9){

				ntextur = "Data/Textures/1D/textura1D_0" + ToString(ptextur + 1);

			}

			if (ptextur >= 9){

				ntextur = "Data/Textures/1D/textura1D_" + ToString(ptextur + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D){

			if (ptextur - ltextur1D < 9){

				ntextur = "Data/Textures/2D/textura2D_0" + ToString(ptextur - ltextur1D + 1);

			}

			if (ptextur - ltextur1D >= 9){

				ntextur = "Data/Textures/2D/textura2D_" + ToString(ptextur - ltextur1D + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D){

			if (ptextur - ltextur1D - ltextur2D < 9){

				ntextur = "Data/Textures/3D/textura3D_0" + ToString(ptextur - ltextur1D - ltextur2D + 1);

			}

			if (ptextur - ltextur1D - ltextur2D >= 9){

				ntextur = "Data/Textures/3D/textura3D_" + ToString(ptextur - ltextur1D - ltextur2D + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli){

			if (ptextur - ltextur1D - ltextur2D - ltextur3D < 9){

				ntextur = "Data/Textures/M/texturaM_0" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D + 1);

			}

			if (ptextur - ltextur1D - ltextur2D - ltextur3D >= 9){

				ntextur = "Data/Textures/M/texturaM_" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV){

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli < 9){

				ntextur = "Data/Textures/MV/texturaMV_0" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli + 1);

			}

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli >= 9){

				ntextur = "Data/Textures/MV/texturaMV_" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP){

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV < 9){

				ntextur = "Data/Textures/M/P/texturaMP_0" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV + 1);

			}

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV >= 9){

				ntextur = "Data/Textures/M/P/texturaMP_" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP + lModeliPV){

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP < 9){

				ntextur = "Data/Textures/MV/PV/texturaMPV_0" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP + 1);

			}

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP >= 9){

				ntextur = "Data/Textures/MV/PV/texturaMPV_" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP + 1);

			}

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP + lModeliPV + ltexturIM){

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP - lModeliPV < 9){

				ntextur = "Data/Textures/IM/Menu_0" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP - lModeliPV + 1);

			}

			if (ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP - lModeliPV >= 9){

				ntextur = "Data/Textures/IM/Menu_" + ToString(ptextur - ltextur1D - ltextur2D - ltextur3D - lModeli - lModeliV - lModeliP - lModeliPV + 1);

			}

		}
	
		if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP + lModeliPV){

			MultiByteToWideChar( CP_ACP, 0, (ntextur + ".dds").c_str(), - 1, dtextur, 100 );	

		}else if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV + lModeliP + lModeliPV + ltexturIM){

			MultiByteToWideChar( CP_ACP, 0, (ntextur + ".png").c_str(), - 1, dtextur, 100 );	

		}

		D3DX11CreateShaderResourceViewFromFile( d3d11Device, dtextur, NULL, NULL, &texturaU[ptextur], NULL );

		if (ptextur < ltextur1D + ltextur2D + ltextur3D + lModeli + lModeliV){

			MultiByteToWideChar( CP_ACP, 0, (ntextur + "_M.png").c_str(), - 1, dtextur, 100 );
			D3DX11CreateShaderResourceViewFromFile( d3d11Device, dtextur, NULL, NULL, &texturaUM[ptextur], NULL );

		}

	}

//////////////////////////////TRANSPARENCY//////////////////////////////

	D3D11_BLEND_DESC blendDesc;
	ZeroMemory( &blendDesc, sizeof(blendDesc) );

	D3D11_RENDER_TARGET_BLEND_DESC rtbd;
	ZeroMemory( &rtbd, sizeof(rtbd) );

	rtbd.BlendEnable			 = true;
	rtbd.SrcBlend				 = D3D11_BLEND_SRC_COLOR;
	rtbd.DestBlend				 = D3D11_BLEND_BLEND_FACTOR;
	rtbd.BlendOp				 = D3D11_BLEND_OP_ADD;
	rtbd.SrcBlendAlpha			 = D3D11_BLEND_ONE;
	rtbd.DestBlendAlpha			 = D3D11_BLEND_ZERO;
	rtbd.BlendOpAlpha			 = D3D11_BLEND_OP_ADD;
	rtbd.RenderTargetWriteMask	 = D3D10_COLOR_WRITE_ENABLE_ALL;

	blendDesc.AlphaToCoverageEnable = false;
	blendDesc.RenderTarget[0] = rtbd;

	d3d11Device->CreateBlendState(&blendDesc, &Transparency);


//////////////////////////////TRANSPARENCY//////////////////////////////



    // Create the sample state
    D3D11_SAMPLER_DESC sampDesc;
    ZeroMemory( &sampDesc, sizeof(sampDesc) );
    sampDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
    sampDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
    sampDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
    sampDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
    sampDesc.ComparisonFunc = D3D11_COMPARISON_NEVER;
    sampDesc.MinLOD = 0;
    sampDesc.MaxLOD = D3D11_FLOAT32_MAX;
    d3d11Device->CreateSamplerState( &sampDesc, &g_pSamplerLinear );

	font.initFont(d3d11Device,d3d11DevCon);
    
	d3d11DevCon->VSSetShader( g_pVertexShader, NULL, 0 );
	d3d11DevCon->VSSetConstantBuffers( 0, 1, &g_pCBNeverChanges );
	d3d11DevCon->VSSetConstantBuffers( 1, 1, &g_pCBChangeOnResize );
	d3d11DevCon->VSSetConstantBuffers( 2, 1, &g_pCBChangesEveryFrame );
	d3d11DevCon->PSSetShader( g_pPixelShader, NULL, 0 );
	d3d11DevCon->PSSetConstantBuffers( 2, 1, &g_pCBChangesEveryFrame );
	d3d11DevCon->PSSetConstantBuffers( 3, 1, &g_pCBPixelShader );
	d3d11DevCon->PSSetSamplers( 0, 1, &g_pSamplerLinear );
			
	cbPS.kolorL = KolorN_00;

Edited by Kamil9132

Share this post


Link to post
Share on other sites

I don't get any errors. I get only couple of warmings about macro redefinition.

This is the entire output window:

'Game.exe' (Win32): Loaded 'C:\Users\Kamil\Documents\MVS\Game\Debug\Game.exe'. Symbols loaded.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d11.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dxgi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\lpk.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\usp10.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3dx11_43.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Users\Kamil\Documents\Moje Dokumenty\MVS\CraftMine\Debug\FW1FontWrapper.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nsi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dsound.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\powrprof.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp110d.dll'. Symbols loaded.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr110d.dll'. Symbols loaded.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ole32.dll'
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dxgidebug.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wintrust.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nvwgf2um.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\psapi.dll'. Cannot find or open the PDB file.
The thread 0x1858 has exited with code 0 (0x0).
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nvspcap.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nvapi.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\gdi32.dll'
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\d3d11_1sdklayers.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\WindowsCodecs.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\DWrite.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\clbcatq.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\MMDevAPI.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\propsys.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\AudioSes.dll'. Cannot find or open the PDB file.
'Game.exe' (Win32): Loaded 'C:\Windows\SysWOW64\avrt.dll'. Cannot find or open the PDB file.
The thread 0x145c has exited with code 0 (0x0).
The thread 0x16f8 has exited with code 0 (0x0).
D3D11 WARNING: Live ID3D11Device at 0x17F10D84, Refcount: 96 [ STATE_CREATION WARNING #441: LIVE_DEVICE]
D3D11 WARNING: 	Live ID3D11Context at 0x2CD30070, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #2097226: LIVE_CONTEXT]
D3D11 WARNING: 	Live ID3DDeviceContextState at 0x2CDF4120, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #3145742: LIVE_DEVICECONTEXTSTATE]
D3D11 WARNING: 	Live ID3D11BlendState at 0x2CDFA274, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11DepthStencilState at 0x2CDFC7EC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING: 	Live ID3D11RasterizerState at 0x2CDFCF24, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x2CDFE67C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11Query at 0x2CDFE894, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #438: LIVE_QUERY]
D3D11 WARNING: 	Live IDXGISwapChain at 0x2CDFEAB0, Refcount: 1 [ STATE_CREATION WARNING #442: LIVE_SWAPCHAIN]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CDFF014, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11RenderTargetView at 0x2CDFFF74, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #428: LIVE_RENDERTARGETVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE002F4, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11DepthStencilView at 0x2CE0164C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #429: LIVE_DEPTHSTENCILVIEW]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2CE01C8C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2CE034CC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2CE0F68C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2CE0FE3C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x2CE0A73C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2CE2488C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E732034, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2CE2442C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E51BAEC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E51C424, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E51D364, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E51E34C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE2533C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE25A9C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE2B0FC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE2B39C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE2D54C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE2D7B4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE15CA4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE15F44, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE17684, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE178EC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE1C43C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE1C6DC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE1DC6C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE1DED4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE1F774, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE1FA14, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE20CDC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE20F44, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE2236C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2CE2260C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2CE233BC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C0F3C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6C271C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C29BC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6C3DB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C3FF4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6C543C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C56DC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6C7494, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C76D4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6C8B1C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6C8DBC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6CA2EC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6CA52C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6CF46C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6CF70C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D0C9C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D0F04, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D232C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D25CC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D3894, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D3B5C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D50BC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D5394, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D662C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D6904, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D7E64, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D813C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6D93D4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6D96AC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6DAC0C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6DAEE4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6DC17C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6DC454, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6DD9B4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6DDC7C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6E01B4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6E0454, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6E25DC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6E287C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6E3B14, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6E3DDC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6F3AB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6F3D54, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6F501C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E6F52E4, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E6F5E3C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E522C3C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E5243C4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52468C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E525954, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E525C1C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E526EB4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52717C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E528414, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E5286DC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E529974, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E529C3C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E52B36C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52B60C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E52C8D4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52CB9C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E52DE34, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52E0FC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E52F394, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E52F65C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E5308F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E530BBC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E531E54, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E53211C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E5333B4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E53367C, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E534914, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E534BDC, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E535E74, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11BlendState at 0x2E5360DC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x2E536994, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E5371CC, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E53845C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E53872C, Refcount: 1, IntRef: 1 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11ShaderResourceView at 0x2E53A40C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #427: LIVE_SHADERRESOURCEVIEW]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E53A7BC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E53BE64, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E53D094, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E53D4F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2E549B9C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x2E54A2EC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11PixelShader at 0x2E54AC7C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #432: LIVE_PIXELSHADER]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E548F3C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11BlendState at 0x2E55348C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #435: LIVE_BLENDSTATE]
D3D11 WARNING: 	Live ID3D11Sampler at 0x2E554424, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #434: LIVE_SAMPLER]
D3D11 WARNING: 	Live ID3D11RasterizerState at 0x2E5545F4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #437: LIVE_RASTERIZERSTATE]
D3D11 WARNING: 	Live ID3D11DepthStencilState at 0x2E54F5DC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #436: LIVE_DEPTHSTENCILSTATE]
D3D11 WARNING: 	Live ID3D11GeometryShader at 0x2E5535D4, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #431: LIVE_GEOMETRYSHADER]
D3D11 WARNING: 	Live ID3D11GeometryShader at 0x2E54EA2C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #431: LIVE_GEOMETRYSHADER]
D3D11 WARNING: 	Live ID3D11VertexShader at 0x2E55FC6C, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #430: LIVE_VERTEXSHADER]
D3D11 WARNING: 	Live ID3D11InputLayout at 0x2E5716CC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #433: LIVE_INPUTLAYOUT]
D3D11 WARNING: 	Live ID3D11Buffer at 0x2E7357AC, Refcount: 1, IntRef: 0 [ STATE_CREATION WARNING #423: LIVE_BUFFER]
D3D11 WARNING: 	Live ID3D11Texture2D at 0x2E744394, Refcount: 0, IntRef: 1 [ STATE_CREATION WARNING #425: LIVE_TEXTURE2D]
The thread 0x1868 has exited with code 0 (0x0).
'Game.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\avrt.dll'
The thread 0x15bc has exited with code 0 (0x0).
The thread 0x450 has exited with code 0 (0x0).
The thread 0x17dc has exited with code 0 (0x0).
The thread 0x1774 has exited with code 0 (0x0).
The thread 0x1908 has exited with code 0 (0x0).
The thread 0xda0 has exited with code 0 (0x0).
The thread 0x1a00 has exited with code 0 (0x0).
The thread 0x1604 has exited with code 0 (0x0).
The thread 0x1350 has exited with code 0 (0x0).
The thread 0x17cc has exited with code 0 (0x0).
The thread 0x19b0 has exited with code 0 (0x0).
The thread 0x1a58 has exited with code 0 (0x0).
The thread 0xd58 has exited with code 0 (0x0).
The thread 0x16d0 has exited with code 0 (0x0).
The thread 0x16a8 has exited with code 0 (0x0).
The thread 0xed8 has exited with code 0 (0x0).
The thread 0x17e4 has exited with code 0 (0x0).
The thread 0x1920 has exited with code 0 (0x0).
The thread 0x11f0 has exited with code 0 (0x0).
D3D11 WARNING: Process is terminating. Using simple reporting. Please call ReportLiveObjects() at runtime for standard reporting. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live Producer at 0x17F10DF8, Refcount: 31. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CD30070, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDF4120, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFA274, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFC7EC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFCF24, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFE67C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFE894, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFEAB0, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFF014, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CDFFF74, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE002F4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE0164C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE01C8C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE034CC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE0F68C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE0FE3C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE0A73C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2488C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E732034, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2442C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E51BAEC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E51C424, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E51D364, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E51E34C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2533C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE25A9C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2B0FC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2D7B4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE15CA4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE178EC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE1C43C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE1DED4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE1F774, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE20F44, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2CE2236C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C0F3C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C271C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C3FF4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C543C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C76D4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6C8B1C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6CA52C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6CF46C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6D0F04, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6D232C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6DDC7C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E01B4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E0454, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E25DC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E287C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E3B14, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6E3DDC, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E6F3AB4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E52468C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E525954, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E525C1C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E526EB4, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E52717C, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E528414, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E536994, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E5371CC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53845C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53872C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53A40C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53A7BC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53BE64, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53D094, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E53D4F4, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E549B9C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E54A2EC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E54AC7C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E548F3C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E55348C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E554424, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E5545F4, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E54F5DC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E5535D4, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E54EA2C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E55FC6C, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E5716CC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E7357AC, Refcount: 1. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: 	Live Object at 0x2E744394, Refcount: 0. [ STATE_CREATION WARNING #0: UNKNOWN]
D3D11 WARNING: Live                         Object :     82 [ STATE_CREATION WARNING #0: UNKNOWN]
DXGI WARNING: Process is terminating. Using simple reporting. Please call ReportLiveObjects() at runtime for standard reporting. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: Live Producer at 0x17E51C70, Refcount: 4. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: 	Live Object at 0x17E64FB8, Refcount: 2. [ STATE_CREATION WARNING #0: ]
DXGI WARNING: Live                         Object :      1 [ STATE_CREATION WARNING #0: ]
The program '[5820] Game.exe' has exited with code 0 (0x0).

Share this post


Link to post
Share on other sites

matrix World is used in drawing without instancing

row_major matrix instancePos is used in drawing with instancing

Edited by Kamil9132

Share this post


Link to post
Share on other sites

Yes, but you are using them in the same way, passing the same data, yet one is column_major and the other is row_major. That doesn't sound right, unless I'm missing something.

Share this post


Link to post
Share on other sites

I am not sure, but i think that for every instance instancePos is changing and World is constant, World is only changing when i update resource using `UpdateSubresource` in main code.

Share this post


Link to post
Share on other sites

I found what was wrong.

I had something like this in code:

ID3D11Buffer*   BTV[2] = {Buffer1, Buffer2};

Then i created Buffer1 and Buffer2.

 

Now i create buffers first, then i create ID3D11Buffer* BTV[2].

Share this post


Link to post
Share on other sites

I think I ran into that similiar issue whereas I forgot to include the two buffers for instancing. It happens but it's a great learning cuve to remember.

 

Rule of thumb - if nothing renders on screen it can be either a shader issue or the rendering part issue in code. I can't count how many times I plug something in and go; wait? Why isn't it rendering anything? I go back to the rendering section of the code look through it and find it. Sometimes it's in the shader code as well.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Partner Spotlight

  • Forum Statistics

    • Total Topics
      627653
    • Total Posts
      2978433
  • Similar Content

    • By evelyn4you
      hi,
      i have read very much about the binding of a constantbuffer to a shader but something is still unclear to me.
      e.g. when performing :   vertexshader.setConstantbuffer ( buffer,  slot )
       is the buffer bound
      a.  to the VertexShaderStage
      or
      b. to the VertexShader that is currently set as the active VertexShader
      Is it possible to bind a constantBuffer to a VertexShader e.g. VS_A and keep this binding even after the active VertexShader has changed ?
      I mean i want to bind constantbuffer_A  to VS_A, an Constantbuffer_B to VS_B  and  only use updateSubresource without using setConstantBuffer command every time.

      Look at this example:
      SetVertexShader ( VS_A )
      updateSubresource(buffer_A)
      vertexshader.setConstantbuffer ( buffer_A,  slot_A )
      perform drawcall       ( buffer_A is used )

      SetVertexShader ( VS_B )
      updateSubresource(buffer_B)
      vertexshader.setConstantbuffer ( buffer_B,  slot_A )
      perform drawcall   ( buffer_B is used )
      SetVertexShader ( VS_A )
      perform drawcall   (now which buffer is used ??? )
       
      I ask this question because i have made a custom render engine an want to optimize to
      the minimum  updateSubresource, and setConstantbuffer  calls
       
       
       
       
       
    • By noodleBowl
      I got a quick question about buffers when it comes to DirectX 11. If I bind a buffer using a command like:
      IASetVertexBuffers IASetIndexBuffer VSSetConstantBuffers PSSetConstantBuffers  and then later on I update that bound buffer's data using commands like Map/Unmap or any of the other update commands.
      Do I need to rebind the buffer again in order for my update to take effect? If I dont rebind is that really bad as in I get a performance hit? My thought process behind this is that if the buffer is already bound why do I need to rebind it? I'm using that same buffer it is just different data
       
    • By Rockmover
      I am really stuck with something that should be very simple in DirectX 11. 
      1. I can draw lines using a PC (position, colored) vertices and a simple shader just fine.
      2. I can draw 3D triangles using PCN (position, colored, normal) vertices just fine (even transparency and SpecularBlinnPhong shaders).
       
      However, if I'm using my 3D shader, and I want to draw my PC lines in the same scene how can I do that?
       
      If I change my lines to PCN and pass them to the 3D shader with my triangles, then the lighting screws them all up.  I only want the lighting for the 3D triangles, but no SpecularBlinnPhong/Lighting for the lines (just PC). 
      I am sure this is because if I change the lines to PNC there is not really a correct "normal" for the lines.  
      I assume I somehow need to draw the 3D triangles using one shader, and then "switch" to another shader and draw the lines?  But I have no clue how to use two different shaders in the same scene.  And then are the lines just drawn on top of the triangles, or vice versa (maybe draw order dependent)?  
      I must be missing something really basic, so if anyone can just point me in the right direction (or link to an example showing the implementation of multiple shaders) that would be REALLY appreciated.
       
      I'm also more than happy to post my simple test code if that helps as well!
       
      THANKS SO MUCH IN ADVANCE!!!
    • By Reitano
      Hi,
      I am writing a linear allocator of per-frame constants using the DirectX 11.1 API. My plan is to replace the traditional constant allocation strategy, where most of the work is done by the driver behind my back, with a manual one inspired by the DirectX 12 and Vulkan APIs.
      In brief, the allocator maintains a list of 64K pages, each page owns a constant buffer managed as a ring buffer. Each page has a history of the N previous frames. At the beginning of a new frame, the allocator retires the frames that have been processed by the GPU and frees up the corresponding space in each page. I use DirectX 11 queries for detecting when a frame is complete and the ID3D11DeviceContext1::VS/PSSetConstantBuffers1 methods for binding constant buffers with an offset.
      The new allocator appears to be working but I am not 100% confident it is actually correct. In particular:
      1) it relies on queries which I am not too familiar with. Are they 100% reliable ?
      2) it maps/unmaps the constant buffer of each page at the beginning of a new frame and then writes the mapped memory as the frame is built. In pseudo code:
      BeginFrame:
          page.data = device.Map(page.buffer)
          device.Unmap(page.buffer)
      RenderFrame
          Alloc(size, initData)
              ...
              memcpy(page.data + page.start, initData, size)
          Alloc(size, initData)
              ...
              memcpy(page.data + page.start, initData, size)
      (Note: calling Unmap at the end of a frame prevents binding the mapped constant buffers and triggers an error in the debug layer)
      Is this valid ? 
      3) I don't fully understand how many frames I should keep in the history. My intuition says it should be equal to the maximum latency reported by IDXGIDevice1::GetMaximumFrameLatency, which is 3 on my machine. But, this value works fine in an unit test while on a more complex demo I need to manually set it to 5, otherwise the allocator starts overwriting previous frames that have not completed yet. Shouldn't the swap chain Present method block the CPU in this case ?
      4) Should I expect this approach to be more efficient than the one managed by the driver ? I don't have meaningful profile data yet.
      Is anybody familiar with the approach described above and can answer my questions and discuss the pros and cons of this technique based on his experience ? 
      For reference, I've uploaded the (WIP) allocator code at https://paste.ofcode.org/Bq98ujP6zaAuKyjv4X7HSv.  Feel free to adapt it in your engine and please let me know if you spot any mistakes
      Thanks
      Stefano Lanza
       
    • By Matt Barr
      Hey all. I've been working with compute shaders lately, and was hoping to build out some libraries to reuse code. As a prerequisite for my current project, I needed to sort a big array of data in my compute shader, so I was going to implement quicksort as a library function. My implementation was going to use an inout array to apply the changes to the referenced array.

      I spent half the day yesterday debugging in visual studio before I realized that the solution, while it worked INSIDE the function, reverted to the original state after returning from the function.

      My hack fix was just to inline the code, but this is not a great solution for the future.  Any ideas? I've considered just returning an array of ints that represents the sorted indices.
  • Popular Now