Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Impossible to use instancing with DirectX 9 when D3DCREATE_HARDWARE_VERTEXPROCESSING is enabled?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
11 replies to this topic

#1 BlurEffect   Members   -  Reputation: 163

Like
0Likes
Like

Posted 06 January 2014 - 11:38 AM

Hey guys,

 

I'm currently working on a project using C++ and DirectX 9 where I have to render a world made up of small building blocks, more specifically lego bricks. As there are thousands of these bricks and I quickly ran into performance issues, I applied instancing to render all small objects with the same mesh in one draw call using a programmed HLSL shader. Previously, as another means to improve performance, I had set up D3D enabling D3DCREATE_HARDWARE_VERTEXPROCESSING and D3DCREATE_PUREDEVICE for vertex processing, what almost doubled the frame rate back then. However, as it turns out, if I keep these settings when using instancing, the whole scene is rendered black. If I switch back to D3DCREATE_SOFTWARE_VERTEXPROCESSING everything is rendered fine, again.

Are usage of D3DCREATE_HARDWARE_VERTEXPROCESSING and instancing in DirectX 9 mutually exclusive or is there some additional flag or parameter that I have to set to alllow both optimizations at once? If you know any other way of optimizing for rendering multiple instances of the same mesh (with chaning position, rotation and colour), feel free to share your thoughts on those, as well.

You don't find alot of ressources on instancing with DirectX 9 on the internet, so I hope you guys can help me. Any advice is appreciated.

 

This is my first post here and I'm not a native English speaker, so have some mercy wink.png



Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 9340

Like
0Likes
Like

Posted 06 January 2014 - 01:39 PM

Instancing works fine with hardware VP; I've used it plenty of times.  It's difficult to guess what your problem is, but I'd suggest that you remove the D3DCREATE_PUREDEVICE first and see if anything changes - pure devices have certain restrictions and you may be doing something else which doesn't work with one.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 BlurEffect   Members   -  Reputation: 163

Like
0Likes
Like

Posted 07 January 2014 - 05:19 AM

Thank you very much for your quick answer. Unfortunately, the PUREDEVICE doesn't seem to be the problem. I tried setting up D3D with hardware VP without the pure device but still the instances wouldn't be rendered. I'll add some code, maybe you can spot something.

 

Here is where I setup D3D and create the device:

 

[source]

HRESULT LegoRenderer::setupD3D(HWND hWnd)
{
    // Create the D3D object, return failure if this can't be done.
    if (NULL == (pD3D_ = Direct3DCreate9(D3D_SDK_VERSION))) return E_FAIL;
    
    D3DPRESENT_PARAMETERS d3dpp;
    ZeroMemory(&d3dpp, sizeof(d3dpp));

    D3DDISPLAYMODE displayMode;

    // Get display mode
      pD3D_->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &displayMode);
 
      // Check for hardware T&L
      D3DCAPS9 D3DCaps;
      pD3D_->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &D3DCaps);
      DWORD vertexProcessing = 0;
      
      if (D3DCaps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) {
        vertexProcessing = D3DCREATE_HARDWARE_VERTEXPROCESSING;
        // Check for pure device
        if (D3DCaps.DevCaps & D3DDEVCAPS_PUREDEVICE) {
          vertexProcessing |= D3DCREATE_PUREDEVICE;
        }
      } else {
        vertexProcessing = D3DCREATE_SOFTWARE_VERTEXPROCESSING;
      }

      // Fill out the presentation parameters
      if (!BuildPresentationParameters(&d3dpp, hWnd, &displayMode)) {
        return 0;
      }
 
      // Create the device
      if (FAILED(pD3D_->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
                                       hWnd, vertexProcessing, &d3dpp, &pD3dDevice_))) {
        return 0;
      }

    // Enable lighting
    pD3dDevice_->SetRenderState(D3DRS_LIGHTING, TRUE);
    // Set up an ambient light
    pD3dDevice_->SetRenderState(D3DRS_AMBIENT, D3DCOLOR_XRGB(255, 255, 255));
    // Enable z-buffering
    pD3dDevice_->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
    // Enable Backface Culling
    pD3dDevice_->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW);
    
    // Display objects in wireframe
    //pD3dDevice_->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);

    return S_OK;
}

BOOL LegoRenderer::BuildPresentationParameters(D3DPRESENT_PARAMETERS* d3dpp, HWND hWnd, D3DDISPLAYMODE* displayMode) {
 
  D3DFORMAT adapterFormat = D3DFMT_X8R8G8B8;
  if (SUCCEEDED(pD3D_->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, adapterFormat,
                                           D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, D3DFMT_D24S8))) {
    d3dpp->AutoDepthStencilFormat = D3DFMT_D24S8;
  } else if (SUCCEEDED(pD3D_->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, adapterFormat,
                                                  D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, D3DFMT_D24X8))) {
    d3dpp->AutoDepthStencilFormat = D3DFMT_D24X8;
  } else if (SUCCEEDED(pD3D_->CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, adapterFormat,
                                                  D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, D3DFMT_D16))) {
    d3dpp->AutoDepthStencilFormat = D3DFMT_D16;
  } else {
    return false;
  }
 
  d3dpp->BackBufferWidth = displayMode->Width;
  d3dpp->BackBufferHeight = displayMode->Height;
  d3dpp->BackBufferFormat = adapterFormat;
  d3dpp->BackBufferCount = 1;
  d3dpp->MultiSampleType = D3DMULTISAMPLE_NONE;
  d3dpp->MultiSampleQuality = 0;
  d3dpp->SwapEffect = D3DSWAPEFFECT_DISCARD;
  d3dpp->hDeviceWindow = hWnd;
  d3dpp->Windowed = false;
  d3dpp->EnableAutoDepthStencil = TRUE;
  d3dpp->FullScreen_RefreshRateInHz = displayMode->RefreshRate;
  d3dpp->PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
 
  return TRUE;
}

[source]

 

Here's how i set up instancing:

 

[source]

HRESULT LegoRenderer::setupInstancing(D3DXMATRIX* projectionMatrix)
{
    setupEffect();

    g_maxInstances = 20000;

    // Set the format of vertices
    D3DVERTEXELEMENT9 vertexElements[] =
    {
        {0, 0,  D3DDECLTYPE_FLOAT3,   D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION,  0},
        {0, 12, D3DDECLTYPE_FLOAT3,   D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL,    0},
        {1, 0,  D3DDECLTYPE_FLOAT4,   D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD,  1},
        {1, 16, D3DDECLTYPE_FLOAT4,   D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD,  2},
        {1, 32, D3DDECLTYPE_FLOAT4,   D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD,  3},
        {1, 48, D3DDECLTYPE_FLOAT4,   D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD,  4},
        {1, 64, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR,    0},
        D3DDECL_END()
    };

    // Get the size of the geometry and instance part of a vertex
    g_vertexGeometrySize = D3DXGetDeclVertexSize(vertexElements, 0);
    g_vertexInstanceSize = D3DXGetDeclVertexSize(vertexElements, 1);

    pD3dDevice_->CreateVertexDeclaration(vertexElements, &g_vertexDeclaration);

    //meshx is your tree model (make sure it contains only position, normal & texcoord
    simpleKnobMesh_.Mesh->GetVertexBuffer(&g_vertexBufferGeometry);
    simpleKnobMesh_.Mesh->GetIndexBuffer(&g_indexBuffer);
    // todo:  add to usage | D3DUSAGE_DYNAMIC
    HRESULT hr = pD3dDevice_->CreateVertexBuffer(g_vertexInstanceSize * g_maxInstances, D3DUSAGE_WRITEONLY|D3DUSAGE_DYNAMIC, NULL, D3DPOOL_DEFAULT, &g_vertexBufferInstances, NULL);
    
    D3DXVECTOR3 position, rotation, scale;
    for(int k = 0; k < g_maxInstances; k++)
    {
        //put at some random position & rotation
        position = D3DXVECTOR3(rand() % 2000 - 1000, 0, rand() % 2000 - 1000);
        rotation = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
        
        D3DXMatrixIdentity(&(instances[k].transform));
        D3DXMatrixTranslation(&(instances[k].transform), rand() % 2000 - 1000, 0, rand() % 2000 - 1000);
        D3DCOLORVALUE colour;
        GetBrickColour(static_cast<BrickColour>((rand() % 20) + 10), &colour);
        instances[k].colour = colour;
    }

    D3DXMATRIX* pInstanceData = 0;
    g_vertexBufferInstances->Lock(0, 0, (LPVOID*)&pInstanceData, 0);
    memcpy(pInstanceData, instances, g_vertexInstanceSize * g_maxInstances);
    g_vertexBufferInstances->Unlock();

    g_numberOfVertices = simpleKnobMesh_.Mesh->GetNumVertices();
    g_numberOfFaces = simpleKnobMesh_.Mesh->GetNumFaces();

    knobMaterial.MatD3D.Diffuse.a = 1.0f;
    knobMaterial.MatD3D.Diffuse.b = 0.5f;
    knobMaterial.MatD3D.Diffuse.g = 1.0f;
    knobMaterial.MatD3D.Diffuse.r = 0.0f;

    knobMaterial.MatD3D.Ambient = knobMaterial.MatD3D.Diffuse;
   
    setupEffectGlobals(projectionMatrix);

    return S_OK;
}

 

void LegoRenderer::setupEffect(void)
{
    ID3DXBuffer *pCompilationErrors = 0;
    DWORD dwShaderFlags = D3DXFX_NOT_CLONEABLE | D3DXSHADER_NO_PRESHADER | D3DXSHADER_OPTIMIZATION_LEVEL3;

    HRESULT hr = D3DXCreateEffectFromFile(pD3dDevice_, "Shader3.fx", 0, 0,
                    dwShaderFlags, 0, &g_effectShader, &pCompilationErrors);

    if (FAILED(hr))
    {
        if (pCompilationErrors)
        {
            std::string compilationErrors(static_cast<const char *>(
                            pCompilationErrors->GetBufferPointer()));

            pCompilationErrors->Release();
            throw std::runtime_error(compilationErrors);
        }
    }

    if (pCompilationErrors)
        pCompilationErrors->Release();
}

 

// most globals of the shader do never change, so I set them once here

void LegoRenderer::setupEffectGlobals(D3DXMATRIX* projectionMatrix)
{
    float attenuation[3];

    g_effectShader->SetMatrix("projectionMatrix", projectionMatrix);

    D3DXMATRIX matrix;
    D3DXMatrixIdentity(&matrix);

    g_effectShader->SetMatrix("worldMatrix", &matrix);

    sceneAmbient[0] = 0.5f;
    sceneAmbient[1] = 0.5f;
    sceneAmbient[2] = 0.5f;
    sceneAmbient[3] = 1.0f;

    // Set the scene global ambient term.
    g_effectShader->SetValue("globalAmbient", &sceneAmbient, sizeof(sceneAmbient));

    // Set the lighting parameters for the shader.
    attenuation[0] = light.Attenuation0;
    attenuation[1] = light.Attenuation1;
    attenuation[2] = light.Attenuation2;
    g_effectShader->SetValue("light.dir", &light.Direction, sizeof(light.Direction));
    g_effectShader->SetValue("light.pos", &light.Position, sizeof(light.Position));
    g_effectShader->SetValue("light.ambient", &light.Ambient, sizeof(light.Ambient));
    g_effectShader->SetValue("light.diffuse", &light.Diffuse, sizeof(light.Diffuse));
    g_effectShader->SetValue("light.specular", &light.Specular, sizeof(light.Specular));
    g_effectShader->SetValue("light.attenuation", attenuation, sizeof(attenuation));
    g_effectShader->SetFloat("light.falloff", light.Falloff);
    g_effectShader->SetFloat("light.theta", light.Theta);
    g_effectShader->SetFloat("light.phi", light.Phi);
    
    // Set the material parameters for the shader.
    g_effectShader->SetValue("material.ambient", &knobMaterial.MatD3D.Ambient, sizeof(knobMaterial.MatD3D.Ambient));
    g_effectShader->SetValue("material.diffuse", &knobMaterial.MatD3D.Diffuse, sizeof(knobMaterial.MatD3D.Diffuse));
    g_effectShader->SetValue("material.emissive", &knobMaterial.MatD3D.Emissive, sizeof(knobMaterial.MatD3D.Emissive));
    g_effectShader->SetValue("material.specular", &knobMaterial.MatD3D.Specular, sizeof(knobMaterial.MatD3D.Specular));
    g_effectShader->SetFloat("material.shininess", knobMaterial.MatD3D.Power);
}

[source]

 

And finally, I render the instances here:

 

[source]

void LegoRenderer::renderInstances(D3DXMATRIX* viewMatrix)
{
    // update the effect
    g_effectShader->SetMatrix("viewMatrix", viewMatrix);

    pD3dDevice_->SetFVF(simpleKnobMesh_.Mesh->GetFVF());

    pD3dDevice_->SetVertexDeclaration(g_vertexDeclaration);
    pD3dDevice_->SetIndices(g_indexBuffer);

    pD3dDevice_->SetStreamSourceFreq(0, (D3DSTREAMSOURCE_INDEXEDDATA | g_maxInstances));
    pD3dDevice_->SetStreamSource(0, g_vertexBufferGeometry, 0, g_vertexGeometrySize);
    pD3dDevice_->SetStreamSourceFreq(1, (D3DSTREAMSOURCE_INSTANCEDATA | 1));
    pD3dDevice_->SetStreamSource(1, g_vertexBufferInstances, 0, g_vertexInstanceSize);

    g_effectShader->SetTechnique("PerVertexDirectionalLighting");
 
    UINT cPasses;
    g_effectShader->Begin(&cPasses, 0);        
    for (DWORD iPass = 0; iPass < cPasses; iPass++)
    {
        g_effectShader->BeginPass(iPass);
        pD3dDevice_->DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0,0, g_numberOfVertices,0, g_numberOfFaces);
        g_effectShader->EndPass();
    }
    g_effectShader->End();

    pD3dDevice_->SetStreamSourceFreq(0, 1);
    pD3dDevice_->SetStreamSourceFreq(1, 1);
}

[source]

 

Again, thank you for your effort. I'm completely in the dark with this issue.



#4 Mona2000   Members   -  Reputation: 747

Like
1Likes
Like

Posted 07 January 2014 - 05:57 AM

Stupid question, but did you check DevCaps for vertex shader 3.0 support? It's required for hardware instancing.



#5 BlurEffect   Members   -  Reputation: 163

Like
0Likes
Like

Posted 07 January 2014 - 06:32 AM

Actually, that was a good question. I didn't even think of checking that as I took it pretty much for granted as being supported. However, I checked it now and shader model 3.0 is supported, so that's not the issue. Still, thanks a lot for your input.



#6 Mona2000   Members   -  Reputation: 747

Like
0Likes
Like

Posted 07 January 2014 - 06:37 AM

Did you try it with the debug runtime?



#7 BlurEffect   Members   -  Reputation: 163

Like
0Likes
Like

Posted 07 January 2014 - 07:41 AM

I didn't use the debug runtime yet. Actually, I didn't know about it at all, I'm still a beginner with these things. When running the application with the debug runtime selected, I get the following output in Visual Studio:

 

 

Direct3D9: (INFO) :======================= Hal HWVP device selected

'Keyboard and Mouse.exe' (Win32): Loaded 'C:\Program Files\Lenovo\Bluetooth Software\syswow64\BtMmHook.dll'. Cannot find or open the PDB file.
'Keyboard and Mouse.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Cannot find or open the PDB file.
'Keyboard and Mouse.exe' (Win32): Loaded 'C:\Windows\SysWOW64\psapi.dll'. Cannot find or open the PDB file.
'Keyboard and Mouse.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Cannot find or open the PDB file.
'Keyboard and Mouse.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\ole32.dll'
Direct3D9: (INFO) :Using FF to VS converter

Direct3D9: (INFO) :Using FF to PS converter

D3DX: (INFO) Using SSE2 optimizations
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
Miss rate before optimization: 1.000000
Miss rate after optimization: 1.000000
'Keyboard and Mouse.exe' (Win32): Loaded 'C:\Windows\SysWOW64\hid.dll'. Cannot find or open the PDB file.
'Keyboard and Mouse.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wintrust.dll'. Cannot find or open the PDB file.
'Keyboard and Mouse.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Cannot find or open the PDB file.
'Keyboard and Mouse.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Cannot find or open the PDB file.
'Keyboard and Mouse.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntmarta.dll'. Cannot find or open the PDB file.
'Keyboard and Mouse.exe' (Win32): Loaded 'C:\Windows\SysWOW64\Wldap32.dll'. Cannot find or open the PDB file.
D3DX: Unicode support: 1

'Keyboard and Mouse.exe' (Win32): Loaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'. Cannot find or open the PDB file.
'Keyboard and Mouse.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'
The thread 0x35c8 has exited with code 0 (0x0).
The thread 0x61a0 has exited with code 0 (0x0).
The thread 0x3a78 has exited with code 0 (0x0).
Direct3D9: (ERROR) :Memory still allocated!  Alloc count = 206
Direct3D9: (ERROR) :Current Process (pid) = 000034e0
Direct3D9: (ERROR) :Memory Address: 036407fc lAllocID=1 dwSize=00004bc4, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 036453f4 lAllocID=2 dwSize=00000350, ReturnAddr=032e02fa (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364577c lAllocID=3 dwSize=00000ef0, ReturnAddr=032e6401 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034ffefc lAllocID=5 dwSize=0000fe60, ReturnAddr=032ee508 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034f0064 lAllocID=6 dwSize=000023dc, ReturnAddr=032dec04 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 036466a4 lAllocID=7 dwSize=000001a0, ReturnAddr=032decd5 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364687c lAllocID=8 dwSize=00000018, ReturnAddr=032ded27 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034f2474 lAllocID=33 dwSize=00002154, ReturnAddr=032d3cab (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 036468cc lAllocID=34 dwSize=000001a0, ReturnAddr=032d3cf1 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03646aa4 lAllocID=35 dwSize=00000018, ReturnAddr=032d3d3e (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03646af4 lAllocID=36 dwSize=00000044, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03646b6c lAllocID=37 dwSize=00000050, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034f45fc lAllocID=45 dwSize=00000ef0, ReturnAddr=032e6401 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03646bf4 lAllocID=46 dwSize=00000030, ReturnAddr=032f0881 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034f5524 lAllocID=47 dwSize=000023dc, ReturnAddr=032dec04 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03646c5c lAllocID=48 dwSize=000001a0, ReturnAddr=032decd5 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03646e34 lAllocID=49 dwSize=00000018, ReturnAddr=032ded27 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034f7934 lAllocID=51 dwSize=00004138, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035108fc lAllocID=52 dwSize=00000198, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03646e84 lAllocID=53 dwSize=00000030, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034fbaa4 lAllocID=54 dwSize=00001020, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034fcafc lAllocID=55 dwSize=00000a48, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034fd57c lAllocID=56 dwSize=00002700, ReturnAddr=032e3703 (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034ffcb4 lAllocID=57 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034ffd64 lAllocID=60 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 034ffe14 lAllocID=61 dwSize=00000098, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03510574 lAllocID=62 dwSize=00000024, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035105cc lAllocID=63 dwSize=00000098, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0351069c lAllocID=64 dwSize=00000044, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03510714 lAllocID=65 dwSize=00000024, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0351076c lAllocID=66 dwSize=000000a8, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03510acc lAllocID=67 dwSize=00000098, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0351084c lAllocID=68 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03510b9c lAllocID=69 dwSize=0002b330, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353bf04 lAllocID=70 dwSize=0000002c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353bf64 lAllocID=71 dwSize=00000028, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353bfc4 lAllocID=72 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353c41c lAllocID=73 dwSize=00000030, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353c484 lAllocID=74 dwSize=00000030, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03646fec lAllocID=75 dwSize=00001020, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353c4ec lAllocID=76 dwSize=00000120, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353c644 lAllocID=77 dwSize=00000060, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03648044 lAllocID=78 dwSize=00000e20, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03648e9c lAllocID=79 dwSize=00000120, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353c6dc lAllocID=80 dwSize=00000060, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353c774 lAllocID=81 dwSize=000003ec, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353cb94 lAllocID=82 dwSize=00000050, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353cc1c lAllocID=83 dwSize=00000050, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353cca4 lAllocID=84 dwSize=00000050, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353cd2c lAllocID=85 dwSize=00000050, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353cdb4 lAllocID=86 dwSize=00000048, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353ce34 lAllocID=87 dwSize=00000054, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353cebc lAllocID=88 dwSize=00000048, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03648ff4 lAllocID=89 dwSize=000000c0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353cf3c lAllocID=90 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 036490ec lAllocID=91 dwSize=000000c0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 036491e4 lAllocID=92 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03649294 lAllocID=93 dwSize=000000c0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364938c lAllocID=94 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364943c lAllocID=95 dwSize=000000b0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03649524 lAllocID=96 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 036495d4 lAllocID=97 dwSize=00000050, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364965c lAllocID=98 dwSize=0000002c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 036496bc lAllocID=99 dwSize=00000028, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364971c lAllocID=100 dwSize=0000002c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364977c lAllocID=101 dwSize=0000517c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364e92c lAllocID=102 dwSize=00001020, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364f984 lAllocID=103 dwSize=0000003c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0353cfec lAllocID=104 dwSize=00004020, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364f9f4 lAllocID=105 dwSize=0000003c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03541044 lAllocID=106 dwSize=0000183c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035428b4 lAllocID=107 dwSize=0000fab8, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364fa64 lAllocID=108 dwSize=00000068, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364fb04 lAllocID=109 dwSize=00000140, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364fc7c lAllocID=110 dwSize=0000003c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035523a4 lAllocID=111 dwSize=00004020, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364fcec lAllocID=112 dwSize=0000003c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035563fc lAllocID=113 dwSize=0000183c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0364fd5c lAllocID=114 dwSize=0000021c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03557c6c lAllocID=115 dwSize=00000224, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03557ec4 lAllocID=116 dwSize=0000003c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03557f34 lAllocID=117 dwSize=00000060, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03557fcc lAllocID=118 dwSize=0000009c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355809c lAllocID=119 dwSize=00000050, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558124 lAllocID=120 dwSize=00000038, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 070a003c lAllocID=122 dwSize=001823d8, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558194 lAllocID=123 dwSize=000000c0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355828c lAllocID=124 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355833c lAllocID=125 dwSize=000000b0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558424 lAllocID=126 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035584d4 lAllocID=127 dwSize=000000b0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035585bc lAllocID=128 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355866c lAllocID=129 dwSize=000000c0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558764 lAllocID=130 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558814 lAllocID=131 dwSize=000000b0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035588fc lAllocID=132 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035589ac lAllocID=133 dwSize=000000b0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558a94 lAllocID=134 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558b44 lAllocID=135 dwSize=00000080, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558bfc lAllocID=136 dwSize=0000002c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558c5c lAllocID=137 dwSize=00000040, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558cd4 lAllocID=138 dwSize=00000040, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558d4c lAllocID=139 dwSize=00000040, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558dc4 lAllocID=140 dwSize=00000060, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558e5c lAllocID=141 dwSize=00000030, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03558ec4 lAllocID=142 dwSize=00000b38, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03559a34 lAllocID=143 dwSize=00001020, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355aa8c lAllocID=144 dwSize=00000120, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355abe4 lAllocID=145 dwSize=00000060, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355ac7c lAllocID=146 dwSize=00001020, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355bcd4 lAllocID=147 dwSize=00000120, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355be2c lAllocID=148 dwSize=00000060, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355bec4 lAllocID=149 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355c31c lAllocID=150 dwSize=000000e4, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355c434 lAllocID=151 dwSize=00000028, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0355c494 lAllocID=152 dwSize=000053c0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0356188c lAllocID=153 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03561ce4 lAllocID=154 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035623f4 lAllocID=159 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0356284c lAllocID=160 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03563f0c lAllocID=178 dwSize=00000084, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 03564034 lAllocID=180 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 0356448c lAllocID=181 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a6c44 lAllocID=1293 dwSize=000000a8, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a6d24 lAllocID=1294 dwSize=0000005c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a6db4 lAllocID=1295 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a6e64 lAllocID=1296 dwSize=00000060, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a6efc lAllocID=1297 dwSize=00000044, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a6f74 lAllocID=1298 dwSize=00000024, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a6fcc lAllocID=1299 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a7114 lAllocID=1300 dwSize=000000b8, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a7204 lAllocID=1301 dwSize=00000140, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a737c lAllocID=1302 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a742c lAllocID=1303 dwSize=0000005c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a74bc lAllocID=1304 dwSize=00000044, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a7534 lAllocID=1305 dwSize=00000024, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a758c lAllocID=1306 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a76d4 lAllocID=1307 dwSize=000000c0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a77cc lAllocID=1308 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a787c lAllocID=1309 dwSize=0000005c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a790c lAllocID=1310 dwSize=00000044, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a7984 lAllocID=1311 dwSize=00000024, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a79dc lAllocID=1312 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a7b24 lAllocID=1313 dwSize=000000c0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a7c1c lAllocID=1314 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a7ccc lAllocID=1315 dwSize=0000005c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a7d5c lAllocID=1316 dwSize=00000044, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a7dd4 lAllocID=1317 dwSize=00000024, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a7e2c lAllocID=1318 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a7f74 lAllocID=1319 dwSize=00000158, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a8104 lAllocID=1320 dwSize=000000a0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a81dc lAllocID=1321 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a8634 lAllocID=1322 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a8a8c lAllocID=1323 dwSize=000006fc, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a91bc lAllocID=1374 dwSize=0000009c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a928c lAllocID=1375 dwSize=00000040, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a9304 lAllocID=1382 dwSize=00000048, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a9384 lAllocID=1383 dwSize=0000009c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a9454 lAllocID=1384 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a98ac lAllocID=1385 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a9d04 lAllocID=1386 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035a9e4c lAllocID=1448 dwSize=000008b4, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035aa734 lAllocID=1449 dwSize=00000b10, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ab27c lAllocID=1450 dwSize=00000034, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ab5bc lAllocID=1458 dwSize=0000002a, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ab2e4 lAllocID=1460 dwSize=00000048, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ab61c lAllocID=1461 dwSize=00000b10, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ac164 lAllocID=1462 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ac5bc lAllocID=1463 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ab364 lAllocID=1464 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035aca14 lAllocID=1465 dwSize=000001a0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ab4ac lAllocID=1467 dwSize=00000060, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ab544 lAllocID=1468 dwSize=00000038, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035acbec lAllocID=1469 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035acd34 lAllocID=1470 dwSize=000000c0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ace2c lAllocID=1471 dwSize=0000007c, ReturnAddr=032fa22b (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035acedc lAllocID=1472 dwSize=0000005c, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035acf6c lAllocID=1473 dwSize=00000044, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035acfe4 lAllocID=1474 dwSize=00000024, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ad03c lAllocID=1475 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ad184 lAllocID=1476 dwSize=00000010, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ad1cc lAllocID=1477 dwSize=000001a0, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ad3a4 lAllocID=1479 dwSize=00000038, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ad414 lAllocID=1480 dwSize=00000204, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ad64c lAllocID=1481 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035adbec lAllocID=1485 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ae044 lAllocID=1486 dwSize=00000420, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ae5e4 lAllocID=1488 dwSize=00000028, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ae874 lAllocID=1495 dwSize=00000048, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ae8f4 lAllocID=1496 dwSize=00000034, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ae95c lAllocID=1497 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035aeaa4 lAllocID=1502 dwSize=00000028, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035aeb04 lAllocID=1503 dwSize=00000048, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035aeb84 lAllocID=1504 dwSize=00000034, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035aebec lAllocID=1505 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035aed34 lAllocID=1509 dwSize=00000048, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035aedb4 lAllocID=1510 dwSize=00000034, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035aee1c lAllocID=1511 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035adaa4 lAllocID=1512 dwSize=00000048, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035adb24 lAllocID=1513 dwSize=00000034, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035ae49c lAllocID=1514 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035aef64 lAllocID=1516 dwSize=000001a4, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035af36c lAllocID=1521 dwSize=000001a4, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035af544 lAllocID=1522 dwSize=00000048, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035af5c4 lAllocID=1523 dwSize=00000034, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Memory Address: 035af62c lAllocID=1524 dwSize=00000112, ReturnAddr=032dd5ea (pid=000034e0)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 2138192 bytes
D3DX: MEMORY LEAKS DETECTED: 168 allocations unfreed (60288 bytes)
D3DX: Set HKLM\Software\Microsoft\Direct3D\D3DXBreakOnAllocId=0x1d6 to debug
The program '[13536] Keyboard and Mouse.exe' has exited with code 0 (0x0).

 

It seems I have quite some memory leaks (will have to look into where they come from). Could these memory issues be the problem for hardware vertex processing not to work with instancing? If I use the debug runtime with software vertex processing and instancing I also get a lot of memory leaks, so I'm not sure if they are the problem here (but of course they are a problem and I will try to get rid of them).



#8 mhagain   Crossbones+   -  Reputation: 9340

Like
0Likes
Like

Posted 07 January 2014 - 12:53 PM

One thing I see is that you don't have a "D3DDECLUSAGE_TEXCOORD, 0" in your vertex declaration.  I don't see anything in the documentation that absolutely requires you to have one, but I imagine that it's an unusual setup that may be buggy in drivers (whereas software VP is performed by the D3D runtime itself, not the driver).  So I'd suggest modifying your declaration to include one, and also modify your HLSL to include a TEXCOORD0 semantic, and see what happens.


Edited by mhagain, 07 January 2014 - 12:53 PM.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#9 BlurEffect   Members   -  Reputation: 163

Like
0Likes
Like

Posted 07 January 2014 - 01:27 PM

Ok, is it somehow possible to add texture coordinate information to the vertices in the c++ code? I exported the meshes without them as I actually don't use them.

By the way, here is the shader I'm using. It is said to do simple vertex lighting for a given material and directional light. I found it on the internet but changed some parts while also commenting out some stuff I don't need (I'm leaving the original copyright notice in place, though).

 

[source]

//-----------------------------------------------------------------------------
// Copyright © 2006-2007 dhpoware. All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
//
// These shaders implement Direct3D's fixed function lighting model as
// describe in:
//  DirectX Documentation for C++ > DirectX Graphics > Direct3D 9 >
//  Programming Guide > Getting Started > Lights and Materials >
//  Mathematics of Lighting.
//
// All lighting calculations are performed in eye space. The shaders only
// support a single material and light source.
//
//-----------------------------------------------------------------------------

struct Light
{
    float3 dir;             // world space direction
    float3 pos;             // world space position
    float4 ambient;
    float4 diffuse;
    float4 specular;
    float3 attenuation;     // [0]=constant [1]=linear [2]=quadratic
    float falloff;          // spot light falloff
    float theta;            // spot light inner cone
    float phi;              // spot light outer cone
};

struct Material
{
    float4 ambient;
    float4 diffuse;
    float4 emissive;
    float4 specular;
    float shininess;
};

//-----------------------------------------------------------------------------
// Globals.
//-----------------------------------------------------------------------------

//float4x4 worldViewProjectionMatrix;
//float4x4 worldViewMatrix;
float4x4 worldViewInverseTransposeMatrix;
float4x4 viewMatrix;

float4x4 worldMatrix;
float4x4 projectionMatrix;

float4 globalAmbient;

Light light;
Material material;

//-----------------------------------------------------------------------------
// Textures.
//-----------------------------------------------------------------------------

//texture colorMapTexture;

//sampler2D colorMap = sampler_state
//{
//    Texture = <colorMapTexture>;
//    MagFilter = Linear;
//    MinFilter = Anisotropic;
//    MipFilter = Linear;
//    MaxAnisotropy = 16;
//};

//-----------------------------------------------------------------------------
// Vertex Shaders.
//-----------------------------------------------------------------------------

struct VS_INPUT
{
    float3 position : POSITION;
    
    float3 normal : NORMAL;
    //float2 texCoord : TEXCOORD0;  //
    // instance matrix below
    float4 W0 : TEXCOORD1;
        float4 W1 : TEXCOORD2;
        float4 W2 : TEXCOORD3;
        float4 W3 : TEXCOORD4;
    float4 color : COLOR0;
};

struct VS_OUTPUT
{
    float4 position : POSITION;
    //float2 texCoord : TEXCOORD0; //
    float4 color : COLOR0;
};

VS_OUTPUT VS_DirLighting(VS_INPUT IN)
{
    VS_OUTPUT OUT;

    //new
    float4x4 object = float4x4(IN.W0, IN.W1, IN.W2, float4(IN.W3.xyz, 1.0f));
        float4x4 objectworld = mul(object, worldMatrix);
    
    float4x4 worldViewMatrix = mul(objectworld, viewMatrix);

        float4x4 worldViewProjectionMatrix = mul(objectworld, mul(viewMatrix, projectionMatrix));
        OUT.position = mul(float4(IN.position, 1.0f), worldViewProjectionMatrix);
    // end of new

//    OUT.position = mul(float4(IN.position, 1.0f), worldViewProjectionMatrix);
//    OUT.texCoord = IN.texCoord;

    float4 pos = mul(float4(IN.position, 1.0f), worldViewMatrix);

    //old line
    //float4 n = mul(float4(IN.normal, 0.0f), worldViewInverseTransposeMatrix);
    // new line
    float4 n = mul(float4(IN.normal, 0.0f), worldViewMatrix);


    float4 l = -normalize(mul(float4(light.dir, 0.0f), viewMatrix));
    float4 v = -normalize(float4(pos.xyz, 0.0f));
    float4 h = normalize(l + v);

    float nDotL = saturate(dot(n, l));
        float nDotH = saturate(dot(n, h));
        float power = (nDotL == 0.0f) ? 0.0f : pow(nDotH, material.shininess);

    float4 ambientColor = IN.color * (globalAmbient + light.ambient);
    float4 diffuseColor = IN.color * light.diffuse * nDotL;
    float4 specularColor = material.specular * light.specular * power;

    OUT.color = material.emissive + ambientColor + diffuseColor + specularColor;

    return OUT;
}

//-----------------------------------------------------------------------------
// Pixel Shaders.
//-----------------------------------------------------------------------------

float4 PS_VertexLighting(VS_OUTPUT IN) : COLOR
{
    return IN.color; // * tex2D(colorMap, IN.texCoord);
}

//-----------------------------------------------------------------------------
// Techniques.
//-----------------------------------------------------------------------------

technique PerVertexDirectionalLighting
{
    pass
    {
        VertexShader = compile vs_2_0 VS_DirLighting();
        PixelShader = compile ps_2_0 PS_VertexLighting();
    }
}

[source]



#10 Tispe   Members   -  Reputation: 1256

Like
1Likes
Like

Posted 09 January 2014 - 12:24 AM

Do you SetVertexShader() and SetPixelShader()?

 

 

 


pD3dDevice_->SetFVF(simpleKnobMesh_.Mesh->GetFVF());

 

Do you need this?

 

 

 


simpleKnobMesh_.Mesh->GetVertexBuffer(&g_vertexBufferGeometry);
simpleKnobMesh_.Mesh->GetIndexBuffer(&g_indexBuffer);

Remember to release(), as the internal reference count increases everytime you call Get*.


Edited by Tispe, 09 January 2014 - 12:28 AM.


#11 BlurEffect   Members   -  Reputation: 163

Like
0Likes
Like

Posted 09 January 2014 - 04:05 AM

Currently I'm not using SetVertexShader() and SetPixelShader(). I'm not sure if you need those when you are using the effect interface. Aren't these two functions called somewhere implicitly?

Apparently, I don't need "pD3dDevice_->SetFVF(simpleKnobMesh_.Mesh->GetFVF());" but removing it didn't solve the problem either.

Can you elaborate a bit on the last part? I'm not sure I understood the part with the internal reference count. Isn't it sufficient to call release() once at the end on the mesh?



#12 unbird   Crossbones+   -  Reputation: 6895

Like
1Likes
Like

Posted 09 January 2014 - 05:40 AM

In the hope you get the same erroneous behaviour: Use PIX ! When the debug layer doesn't give useful clues (I don't think the leaks are the culprit here) it's time to get a closer look at what actually happens. Compare it with the running version and maybe use a very simple mesh (e.g. cube) and only a couple of instances for a start.

As an aside: Not sure, but since instancing needs SM 3, try actually using vs_3_0 and ps_3_0 in your shaders.

PS: And please use code tags when posting code.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS