• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By kanageddaamen
      Hello all,
      I am currently working on a game engine for use with my game development that I would like to be as flexible as possible.  As such the exact requirements for how things should work can't be nailed down to a specific implementation and I am looking for, at least now, a default good average case scenario design.
      Here is what I have implemented:
      Deferred rendering using OpenGL Arbitrary number of lights and shadow mapping Each rendered object, as defined by a set of geometry, textures, animation data, and a model matrix is rendered with its own draw call Skeletal animations implemented on the GPU.   Model matrix transformation implemented on the GPU Frustum and octree culling for optimization Here are my questions and concerns:
      Doing the skeletal animation on the GPU, currently, requires doing the skinning for each object multiple times per frame: once for the initial geometry rendering and once for the shadow map rendering for each light for which it is not culled.  This seems very inefficient.  Is there a way to do skeletal animation on the GPU only once across these render calls? Without doing the model matrix transformation on the CPU, I fail to see how I can easily batch objects with the same textures and shaders in a single draw call without passing a ton of matrix data to the GPU (an array of model matrices then an index for each vertex into that array for transformation purposes?) If I do the matrix transformations on the CPU, It seems I can't really do the skinning on the GPU as the pre-transformed vertexes will wreck havoc with the calculations, so this seems not viable unless I am missing something Overall it seems like simplest solution is to just do all of the vertex manipulation on the CPU and pass the pre-transformed data to the GPU, using vertex shaders that do basically nothing.  This doesn't seem the most efficient use of the graphics hardware, but could potentially reduce the number of draw calls needed.

      Really, I am looking for some advice on how to proceed with this, how something like this is typically handled.  Are the multiple draw calls and skinning calculations not a huge deal?  I would LIKE to save as much of the CPU's time per frame so it can be tasked with other things, as to keep CPU resources open to the implementation of the engine.  However, that becomes a moot point if the GPU becomes a bottleneck.
    • By DiligentDev
      I would like to introduce Diligent Engine, a project that I've been recently working on. Diligent Engine is a light-weight cross-platform abstraction layer between the application and the platform-specific graphics API. Its main goal is to take advantages of the next-generation APIs such as Direct3D12 and Vulkan, but at the same time provide support for older platforms via Direct3D11, OpenGL and OpenGLES. Diligent Engine exposes common front-end for all supported platforms and provides interoperability with underlying native API. Shader source code converter allows shaders authored in HLSL to be translated to GLSL and used on all platforms. Diligent Engine supports integration with Unity and is designed to be used as a graphics subsystem in a standalone game engine, Unity native plugin or any other 3D application. It is distributed under Apache 2.0 license and is free to use. Full source code is available for download on GitHub.
      True cross-platform Exact same client code for all supported platforms and rendering backends No #if defined(_WIN32) ... #elif defined(LINUX) ... #elif defined(ANDROID) ... No #if defined(D3D11) ... #elif defined(D3D12) ... #elif defined(OPENGL) ... Exact same HLSL shaders run on all platforms and all backends Modular design Components are clearly separated logically and physically and can be used as needed Only take what you need for your project (do not want to keep samples and tutorials in your codebase? Simply remove Samples submodule. Only need core functionality? Use only Core submodule) No 15000 lines-of-code files Clear object-based interface No global states Key graphics features: Automatic shader resource binding designed to leverage the next-generation rendering APIs Multithreaded command buffer generation 50,000 draw calls at 300 fps with D3D12 backend Descriptor, memory and resource state management Modern c++ features to make code fast and reliable The following platforms and low-level APIs are currently supported:
      Windows Desktop: Direct3D11, Direct3D12, OpenGL Universal Windows: Direct3D11, Direct3D12 Linux: OpenGL Android: OpenGLES MacOS: OpenGL iOS: OpenGLES API Basics
      The engine can perform initialization of the API or attach to already existing D3D11/D3D12 device or OpenGL/GLES context. For instance, the following code shows how the engine can be initialized in D3D12 mode:
      #include "RenderDeviceFactoryD3D12.h" using namespace Diligent; // ...  GetEngineFactoryD3D12Type GetEngineFactoryD3D12 = nullptr; // Load the dll and import GetEngineFactoryD3D12() function LoadGraphicsEngineD3D12(GetEngineFactoryD3D12); auto *pFactoryD3D11 = GetEngineFactoryD3D12(); EngineD3D12Attribs EngD3D12Attribs; EngD3D12Attribs.CPUDescriptorHeapAllocationSize[0] = 1024; EngD3D12Attribs.CPUDescriptorHeapAllocationSize[1] = 32; EngD3D12Attribs.CPUDescriptorHeapAllocationSize[2] = 16; EngD3D12Attribs.CPUDescriptorHeapAllocationSize[3] = 16; EngD3D12Attribs.NumCommandsToFlushCmdList = 64; RefCntAutoPtr<IRenderDevice> pRenderDevice; RefCntAutoPtr<IDeviceContext> pImmediateContext; SwapChainDesc SwapChainDesc; RefCntAutoPtr<ISwapChain> pSwapChain; pFactoryD3D11->CreateDeviceAndContextsD3D12( EngD3D12Attribs, &pRenderDevice, &pImmediateContext, 0 ); pFactoryD3D11->CreateSwapChainD3D12( pRenderDevice, pImmediateContext, SwapChainDesc, hWnd, &pSwapChain ); Creating Resources
      Device resources are created by the render device. The two main resource types are buffers, which represent linear memory, and textures, which use memory layouts optimized for fast filtering. To create a buffer, you need to populate BufferDesc structure and call IRenderDevice::CreateBuffer(). The following code creates a uniform (constant) buffer:
      BufferDesc BuffDesc; BufferDesc.Name = "Uniform buffer"; BuffDesc.BindFlags = BIND_UNIFORM_BUFFER; BuffDesc.Usage = USAGE_DYNAMIC; BuffDesc.uiSizeInBytes = sizeof(ShaderConstants); BuffDesc.CPUAccessFlags = CPU_ACCESS_WRITE; m_pDevice->CreateBuffer( BuffDesc, BufferData(), &m_pConstantBuffer ); Similar, to create a texture, populate TextureDesc structure and call IRenderDevice::CreateTexture() as in the following example:
      TextureDesc TexDesc; TexDesc.Name = "My texture 2D"; TexDesc.Type = TEXTURE_TYPE_2D; TexDesc.Width = 1024; TexDesc.Height = 1024; TexDesc.Format = TEX_FORMAT_RGBA8_UNORM; TexDesc.Usage = USAGE_DEFAULT; TexDesc.BindFlags = BIND_SHADER_RESOURCE | BIND_RENDER_TARGET | BIND_UNORDERED_ACCESS; TexDesc.Name = "Sample 2D Texture"; m_pRenderDevice->CreateTexture( TexDesc, TextureData(), &m_pTestTex ); Initializing Pipeline State
      Diligent Engine follows Direct3D12 style to configure the graphics/compute pipeline. One big Pipelines State Object (PSO) encompasses all required states (all shader stages, input layout description, depth stencil, rasterizer and blend state descriptions etc.)
      Creating Shaders
      To create a shader, populate ShaderCreationAttribs structure. An important member is ShaderCreationAttribs::SourceLanguage. The following are valid values for this member:
      SHADER_SOURCE_LANGUAGE_DEFAULT  - The shader source format matches the underlying graphics API: HLSL for D3D11 or D3D12 mode, and GLSL for OpenGL and OpenGLES modes. SHADER_SOURCE_LANGUAGE_HLSL  - The shader source is in HLSL. For OpenGL and OpenGLES modes, the source code will be converted to GLSL. See shader converter for details. SHADER_SOURCE_LANGUAGE_GLSL  - The shader source is in GLSL. There is currently no GLSL to HLSL converter. To allow grouping of resources based on the frequency of expected change, Diligent Engine introduces classification of shader variables:
      Static variables (SHADER_VARIABLE_TYPE_STATIC) are variables that are expected to be set only once. They may not be changed once a resource is bound to the variable. Such variables are intended to hold global constants such as camera attributes or global light attributes constant buffers. Mutable variables (SHADER_VARIABLE_TYPE_MUTABLE) define resources that are expected to change on a per-material frequency. Examples may include diffuse textures, normal maps etc. Dynamic variables (SHADER_VARIABLE_TYPE_DYNAMIC) are expected to change frequently and randomly. This post describes the resource binding model in Diligent Engine.
      The following is an example of shader initialization:
      ShaderCreationAttribs Attrs; Attrs.Desc.Name = "MyPixelShader"; Attrs.FilePath = "MyShaderFile.fx"; Attrs.SearchDirectories = "shaders;shaders\\inc;"; Attrs.EntryPoint = "MyPixelShader"; Attrs.Desc.ShaderType = SHADER_TYPE_PIXEL; Attrs.SourceLanguage = SHADER_SOURCE_LANGUAGE_HLSL; BasicShaderSourceStreamFactory BasicSSSFactory(Attrs.SearchDirectories); Attrs.pShaderSourceStreamFactory = &BasicSSSFactory; ShaderVariableDesc ShaderVars[] =  {     {"g_StaticTexture", SHADER_VARIABLE_TYPE_STATIC},     {"g_MutableTexture", SHADER_VARIABLE_TYPE_MUTABLE},     {"g_DynamicTexture", SHADER_VARIABLE_TYPE_DYNAMIC} }; Attrs.Desc.VariableDesc = ShaderVars; Attrs.Desc.NumVariables = _countof(ShaderVars); Attrs.Desc.DefaultVariableType = SHADER_VARIABLE_TYPE_STATIC; StaticSamplerDesc StaticSampler; StaticSampler.Desc.MinFilter = FILTER_TYPE_LINEAR; StaticSampler.Desc.MagFilter = FILTER_TYPE_LINEAR; StaticSampler.Desc.MipFilter = FILTER_TYPE_LINEAR; StaticSampler.TextureName = "g_MutableTexture"; Attrs.Desc.NumStaticSamplers = 1; Attrs.Desc.StaticSamplers = &StaticSampler; ShaderMacroHelper Macros; Macros.AddShaderMacro("USE_SHADOWS", 1); Macros.AddShaderMacro("NUM_SHADOW_SAMPLES", 4); Macros.Finalize(); Attrs.Macros = Macros; RefCntAutoPtr<IShader> pShader; m_pDevice->CreateShader( Attrs, &pShader ); Creating the Pipeline State Object
      To create a pipeline state object, define instance of PipelineStateDesc structure. The structure defines the pipeline specifics such as if the pipeline is a compute pipeline, number and format of render targets as well as depth-stencil format:
      // This is a graphics pipeline PSODesc.IsComputePipeline = false; PSODesc.GraphicsPipeline.NumRenderTargets = 1; PSODesc.GraphicsPipeline.RTVFormats[0] = TEX_FORMAT_RGBA8_UNORM_SRGB; PSODesc.GraphicsPipeline.DSVFormat = TEX_FORMAT_D32_FLOAT; The structure also defines depth-stencil, rasterizer, blend state, input layout and other parameters. For instance, rasterizer state can be defined as in the code snippet below:
      // Init rasterizer state RasterizerStateDesc &RasterizerDesc = PSODesc.GraphicsPipeline.RasterizerDesc; RasterizerDesc.FillMode = FILL_MODE_SOLID; RasterizerDesc.CullMode = CULL_MODE_NONE; RasterizerDesc.FrontCounterClockwise = True; RasterizerDesc.ScissorEnable = True; //RSDesc.MultisampleEnable = false; // do not allow msaa (fonts would be degraded) RasterizerDesc.AntialiasedLineEnable = False; When all fields are populated, call IRenderDevice::CreatePipelineState() to create the PSO:
      m_pDev->CreatePipelineState(PSODesc, &m_pPSO); Binding Shader Resources
      Shader resource binding in Diligent Engine is based on grouping variables in 3 different groups (static, mutable and dynamic). Static variables are variables that are expected to be set only once. They may not be changed once a resource is bound to the variable. Such variables are intended to hold global constants such as camera attributes or global light attributes constant buffers. They are bound directly to the shader object:
      PixelShader->GetShaderVariable( "g_tex2DShadowMap" )->Set( pShadowMapSRV ); Mutable and dynamic variables are bound via a new object called Shader Resource Binding (SRB), which is created by the pipeline state:
      m_pPSO->CreateShaderResourceBinding(&m_pSRB); Dynamic and mutable resources are then bound through SRB object:
      m_pSRB->GetVariable(SHADER_TYPE_VERTEX, "tex2DDiffuse")->Set(pDiffuseTexSRV); m_pSRB->GetVariable(SHADER_TYPE_VERTEX, "cbRandomAttribs")->Set(pRandomAttrsCB); The difference between mutable and dynamic resources is that mutable ones can only be set once for every instance of a shader resource binding. Dynamic resources can be set multiple times. It is important to properly set the variable type as this may affect performance. Static variables are generally most efficient, followed by mutable. Dynamic variables are most expensive from performance point of view. This post explains shader resource binding in more details.
      Setting the Pipeline State and Invoking Draw Command
      Before any draw command can be invoked, all required vertex and index buffers as well as the pipeline state should be bound to the device context:
      // Clear render target const float zero[4] = {0, 0, 0, 0}; m_pContext->ClearRenderTarget(nullptr, zero); // Set vertex and index buffers IBuffer *buffer[] = {m_pVertexBuffer}; Uint32 offsets[] = {0}; Uint32 strides[] = {sizeof(MyVertex)}; m_pContext->SetVertexBuffers(0, 1, buffer, strides, offsets, SET_VERTEX_BUFFERS_FLAG_RESET); m_pContext->SetIndexBuffer(m_pIndexBuffer, 0); m_pContext->SetPipelineState(m_pPSO); Also, all shader resources must be committed to the device context:
      m_pContext->CommitShaderResources(m_pSRB, COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES); When all required states and resources are bound, IDeviceContext::Draw() can be used to execute draw command or IDeviceContext::DispatchCompute() can be used to execute compute command. Note that for a draw command, graphics pipeline must be bound, and for dispatch command, compute pipeline must be bound. Draw() takes DrawAttribs structure as an argument. The structure members define all attributes required to perform the command (primitive topology, number of vertices or indices, if draw call is indexed or not, if draw call is instanced or not, if draw call is indirect or not, etc.). For example:
      DrawAttribs attrs; attrs.IsIndexed = true; attrs.IndexType = VT_UINT16; attrs.NumIndices = 36; attrs.Topology = PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; pContext->Draw(attrs); Tutorials and Samples
      The GitHub repository contains a number of tutorials and sample applications that demonstrate the API usage.
      Tutorial 01 - Hello Triangle This tutorial shows how to render a simple triangle using Diligent Engine API.   Tutorial 02 - Cube This tutorial demonstrates how to render an actual 3D object, a cube. It shows how to load shaders from files, create and use vertex, index and uniform buffers.   Tutorial 03 - Texturing This tutorial demonstrates how to apply a texture to a 3D object. It shows how to load a texture from file, create shader resource binding object and how to sample a texture in the shader.   Tutorial 04 - Instancing This tutorial demonstrates how to use instancing to render multiple copies of one object using unique transformation matrix for every copy.   Tutorial 05 - Texture Array This tutorial demonstrates how to combine instancing with texture arrays to use unique texture for every instance.   Tutorial 06 - Multithreading This tutorial shows how to generate command lists in parallel from multiple threads.   Tutorial 07 - Geometry Shader This tutorial shows how to use geometry shader to render smooth wireframe.   Tutorial 08 - Tessellation This tutorial shows how to use hardware tessellation to implement simple adaptive terrain rendering algorithm.   Tutorial_09 - Quads This tutorial shows how to render multiple 2D quads, frequently swithcing textures and blend modes.
      AntTweakBar sample demonstrates how to use AntTweakBar library to create simple user interface.

      Atmospheric scattering sample is a more advanced example. It demonstrates how Diligent Engine can be used to implement various rendering tasks: loading textures from files, using complex shaders, rendering to textures, using compute shaders and unordered access views, etc. 

      The repository includes Asteroids performance benchmark based on this demo developed by Intel. It renders 50,000 unique textured asteroids and lets compare performance of D3D11 and D3D12 implementations. Every asteroid is a combination of one of 1000 unique meshes and one of 10 unique textures. 

      Integration with Unity
      Diligent Engine supports integration with Unity through Unity low-level native plugin interface. The engine relies on Native API Interoperability to attach to the graphics API initialized by Unity. After Diligent Engine device and context are created, they can be used us usual to create resources and issue rendering commands. GhostCubePlugin shows an example how Diligent Engine can be used to render a ghost cube only visible as a reflection in a mirror.

    • By Yxjmir
      I'm trying to load data from a .gltf file into a struct to use to load a .bin file. I don't think there is a problem with how the vertex positions are loaded, but with the indices. This is what I get when drawing with glDrawArrays(GL_LINES, ...):

      Also, using glDrawElements gives a similar result. Since it looks like its drawing triangles using the wrong vertices for each face, I'm assuming it needs an index buffer/element buffer. (I'm not sure why there is a line going through part of it, it doesn't look like it belongs to a side, re-exported it without texture coordinates checked, and its not there)
      I'm using jsoncpp to load the GLTF file, its format is based on JSON. Here is the gltf struct I'm using, and how I parse the file:
      #define GLTF_TARGET_ARRAY_BUFFER (34962) #define GLTF_TARGET_ELEMENT_ARRAY_BUFFER (34963) #define GLTF_COMPONENT_TYPE_BYTE (5120) #define GLTF_COMPONENT_TYPE_UNSIGNED_BYTE (5121) #define GLTF_COMPONENT_TYPE_SHORT (5122) #define GLTF_COMPONENT_TYPE_UNSIGNED_SHORT (5123) #define GLTF_COMPONENT_TYPE_INT (5124) #define GLTF_COMPONENT_TYPE_UNSIGNED_INT (5125) #define GLTF_COMPONENT_TYPE_FLOAT (5126) #define GLTF_COMPONENT_TYPE_DOUBLE (5127) #define GLTF_PARAMETER_TYPE_BYTE (5120) #define GLTF_PARAMETER_TYPE_UNSIGNED_BYTE (5121) #define GLTF_PARAMETER_TYPE_SHORT (5122) #define GLTF_PARAMETER_TYPE_UNSIGNED_SHORT (5123) #define GLTF_PARAMETER_TYPE_INT (5124) #define GLTF_PARAMETER_TYPE_UNSIGNED_INT (5125) #define GLTF_PARAMETER_TYPE_FLOAT (5126) #define GLTF_PARAMETER_TYPE_FLOAT_VEC2 (35664) #define GLTF_PARAMETER_TYPE_FLOAT_VEC3 (35665) #define GLTF_PARAMETER_TYPE_FLOAT_VEC4 (35666) struct GLTF { struct Accessor { USHORT bufferView; USHORT componentType; UINT count; vector<INT> max; vector<INT> min; string type; }; vector<Accessor> m_accessors; struct Asset { string copyright; string generator; string version; }m_asset; struct BufferView { UINT buffer; UINT byteLength; UINT byteOffset; UINT target; }; vector<BufferView> m_bufferViews; struct Buffer { UINT byteLength; string uri; }; vector<Buffer> m_buffers; vector<string> m_Images; struct Material { string name; string alphaMode; Vec4 baseColorFactor; UINT baseColorTexture; UINT normalTexture; float metallicFactor; }; vector<Material> m_materials; struct Meshes { string name; struct Primitive { vector<UINT> attributes_indices; UINT indices; UINT material; }; vector<Primitive> primitives; }; vector<Meshes> m_meshes; struct Nodes { int mesh; string name; Vec3 translation; }; vector<Nodes> m_nodes; struct Scenes { UINT index; string name; vector<UINT> nodes; }; vector<Scenes> m_scenes; vector<UINT> samplers; struct Textures { UINT sampler; UINT source; }; vector<Textures> m_textures; map<UINT, string> attributes_map; map<UINT, string> textures_map; }; GLTF m_gltf; // This is actually in the Mesh class bool Mesh::Load(string sFilename) { string sFileAsString; stringstream sStream; ifstream fin(sFilename); sStream << fin.rdbuf(); fin.close(); sFileAsString = sStream.str(); Json::Reader r; Json::Value root; if (!r.parse(sFileAsString, root)) { string errors = r.getFormatedErrorMessages(); if (errors != "") { // TODO: Log errors return false; } } if (root.isNull()) return false; Json::Value object; Json::Value value; // Load Accessors array, these are referenced by attributes with their index value object = root.get("accessors", Json::Value()); // store object with key "accessors", if not found it will default to Json::Value() if (!object.isNull()) { for (Json::ValueIterator it = object.begin(); it != object.end(); it++) { GLTF::Accessor accessor; value = (*it).get("bufferView", Json::Value()); if (!value.isNull()) accessor.bufferView = value.asUINT(); else return false; value = (*it).get("componentType", Json::Value()); if (!value.isNull()) accessor.componentType = value.asUINT(); else return false; value = (*it).get("count", Json::Value()); if (!value.isNull()) accessor.count = value.asUINT(); else return false; value = (*it).get("type", Json::Value()); if (!value.isNull()) accessor.type = value.asString(); else return false; m_gltf.accessors.push_back(accessor); } } else return false; object = root.get("bufferViews", Json::Value()); if(!object.isNull()) { for (Json::ValueIterator it = object.begin(); it != object.end(); it++) { GLTF::BufferView bufferView; value = (*it).get("buffer", Json::Value()); if(!value.isNull()) bufferView.buffer = value.asUInt(); else return false; value = (*it).get("byteLength", Json::Value()); if(!value.isNull()) bufferView.byteLength = value.asUInt(); else return false; value = (*it).get("byteOffset", Json::Value()); if(!value.isNull()) bufferView.byteOffset = value.asUInt(); else return false; value = (*it).get("target", Json::Value()); if(!value.isNull()) bufferView.target = value.asUInt(); else return false; m_gltf.m_bufferViews.push_back(bufferView); } } else return false; object = root.get("buffers", Json::Value()); if(!object.isNull()) { for (Json::ValueIterator it = object.begin(); it != object.end(); it++) { GLTF::Buffer buffer; value = (*it).get("byteLength", Json::Value()); if(!value.isNull()) buffer.byteLength = value.asUInt(); else return false; // Store the filename of the .bin file value = (*it).get("uri", Json::Value()); if(!value.isNull()) buffer.uri = value.asString(); else return false; } } else return false; object = root.get("meshes", Json::Value()); if(!object.isNull()) { for(Json::ValueIterator it = object.begin(); it != object.end(); it++) { GLTF::Meshes mesh; value = (*it).get("primitives", Json::Value()); for(Json::ValueIterator value_it = value.begin(); value_it != value.end(); value_it++) { GLTF::Meshes::Primitive primitive; Json::Value attributes; attributes = (*value_it).get("attributes", Json::Value()); vector<string> memberNames = attributes.getMemberNames(); for(size_t i = 0; i < memberNames.size(); i++) { Json::Value member; member = attributes.get(memeberNames[i], Json::Value()); if(!member.isNull()) { primitive.attributes_indices.push_back(member.asUInt()); m_gltf.attributes_map[member.asUInt()] = memberNames[i]; // Each of these referes to an accessor by indice, so each indice should be unique, and they are when loading a cube } else return false; } // Indice of the accessor used for indices Json::Value indices; indices = (*value_it).get("indices", Json::Value()); primitive.indices = indices.asUInt(); mesh.primitives.push_back(primitive); } m_gltf.m_meshes.push_back(mesh); } } vector<float> vertexData; vector<USHORT> indiceData; int vertexBufferSizeTotal = 0; int elementBufferSizeTotal = 0; GLTF::Meshes mesh = m_gltf.m_meshes[0]; vector<GLTF::Meshes::Primitive> primitives = mesh.primitives; // trying to make the code easier to read for (size_t p = 0; p < primitive.size(); p++) { vector<UINT> attributes = primitives[p].attributes_indices; for(size_t a = 0; a < attributes.size(); a++) { GLTF::Accessor accessor = m_gltf.m_accessors[attributes[a]]; GLTF::BufferView bufferView = m_gltf.m_bufferViews[accessor.bufferView]; UINT target = bufferView.target; if(target == GLTF_TARGET_ARRAY_BUFFER) vertexBufferSizeTotal += bufferView.byteLength; } UINT indice = primitives[p].indices; GLTF::BufferView bufferView = m_gltf.m_bufferViews[indice]; UINT target = bufferView.target; if(target == GLTF_TARGET_ELEMENT_ARRAY_BUFFER) elementBufferSizeTotal += bufferView.byteLength; } // These have already been generated glBindVertexArray(g_pGame->m_VAO); glBindBuffer(GL_ARRAY_BUFFER, g_pGame->m_VBO); glBufferData(GL_ARRAY_BUFFER, vertexBufferSizeTotal, nullptr, GL_STATIC_DRAW); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, g_pGame->m_EBO); glBufferData(GL_ELEMENT_ARRAY_BUFFER, elementBufferSizeTotal, nullptr, GL_STATIC_DRAW); int offset = 0; int offset_indice = 0; for (size_t p = 0; p < primitive.size(); p++) { vector<UINT> attributes = primitives[p].attributes_indices; int pos = sFilename.find_last_of('\\') + 1; string sFolder = sFilename.substr(0, pos); for (size_t a = 0; a < attributes.size(); a++) { LoadBufferView(sFolder, attributes[a], data, offset); } UINT indice = primitives[p].indices; GLTF::BufferView bufferView_indice = m_gltf.m_bufferViews[indice]; UINT target_indice = bufferView_indice.target; bool result = LoadBufferView(sFolder, indice, data, offset_indice); if(!result) return false; } return true; } bool Mesh::LoadBufferView(string sFolder, UINT a, vector<float> &vertexData, vector<float> &indiceData, int &offset_indice) { ifstream fin; GLTF::Accessor accessor = m_gltf.m_accessors[a]; GLTF::BufferView bufferView = m_gltf.m_bufferViews[accessor.bufferView]; GLTF::Buffer buffer = m_gltf.m_buffers[bufferView.buffer]; const size_t count = accessor.count; UINT target = bufferView.target; int elementSize; int componentSize; int numComponents; string sFilename_bin = sFolder + buffer.uri; fin.open(sFilename_bin, ios::binary); if (fin.fail()) { return false; } fin.seekg(bufferView.byteOffset, ios::beg); switch (accessor.componentType) { case GLTF_COMPONENT_TYPE_BYTE: componentSize = sizeof(GLbyte); break; case GLTF_COMPONENT_TYPE_UNSIGNED_BYTE: componentSize = sizeof(GLubyte); break; case GLTF_COMPONENT_TYPE_SHORT: componentSize = sizeof(GLshort); break; case GLTF_COMPONENT_TYPE_UNSIGNED_SHORT: componentSize = sizeof(GLushort); break; case GLTF_COMPONENT_TYPE_INT: componentSize = sizeof(GLint); break; case GLTF_COMPONENT_TYPE_UNSIGNED_INT: componentSize = sizeof(GLuint); break; case GLTF_COMPONENT_TYPE_FLOAT: componentSize = sizeof(GLfloat); break; case GLTF_COMPONENT_TYPE_DOUBLE: componentSize = sizeof(GLfloat); break; default: componentSize = 0; break; } if (accessor.type == "SCALAR") numComponents = 1; else if (accessor.type == "VEC2") numComponents = 2; else if (accessor.type == "VEC3") numComponents = 3; else if (accessor.type == "VEC4") numComponents = 4; else if (accessor.type == "MAT2") numComponents = 4; else if (accessor.type == "MAT3") numComponents = 9; else if (accessor.type == "MAT4") numComponents = 16; else return false; vector<float> fSubdata; // I'm pretty sure this is one of the problems, or related to it. If I use vector<USHORT> only half of the vector if filled, if I use GLubyte, the entire vector is filled, but the data might not be right vector<GLubyte> nSubdata; elementSize = (componentSize) * (numComponents); // Only fill the vector I'm using if (accessor.type == "SCALAR") { nSubdata.resize(count * numComponents); fin.read(reinterpret_cast<char*>(&nSubdata[0]), count/* * elementSize*/); // I commented this out since I'm not sure which size the .bin is storing the indice values, and I kept getting runtime errors, no matter what type I used for nSubdata } else { fSubdata.resize(count * numComponents); fin.read(reinterpret_cast<char*>(&fSubdata[0]), count * elementSize); } switch (target) { case GLTF_TARGET_ARRAY_BUFFER: { vertexData.insert(vertexData.end(), fSubdata.begin(), fSubdata.end()); glBindBuffer(GL_ARRAY_BUFFER, g_pGame->m_VBO); glBufferSubData(GL_ARRAY_BUFFER, offset, fSubdata.size() * componentSize, &fSubdata[0]); int attribute_index = 0; // I'm only loading vertex positions, the only attribute stored in the files for now glEnableVertexAttribArray(attribute_index); glVertexAttribPointer(0, numComponents, GL_FLOAT, GL_FALSE, componentSize * numComponents, (void*)(offset)); }break; case GLTF_TARGET_ELEMENT_ARRAY_BUFFER: { indiceData.insert(indiceData.end(), nSubdata.begin(), nSubdata.end()); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, g_pGame->m_EBO); // This is another area where I'm not sure of the correct values, but if componentSize is the correct size for the type being used it should be correct glBufferSubData is expecting the size in bytes, right? glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, offset, nSubdata.size() * componentSize, &nSubdata[0]); }break; default: return false; } if (accessor.type == "SCALAR") offset += nSubdata.size() * componentSize; else offset += fSubdata.size() * componentSize; fin.close(); return true; } these are the draw calls, I only use one at a time, but neither is currently display properly, g_pGame->m_indices is the same as indiceData vector, and vertexCount contains the correct vertex count, but I forgot to copy the lines of code containing where I set them, which is at the end of Mesh::Load(), I double checked the values to make sure.
      glDrawElements(GL_LINES, g_pGame->m_indices.size(), GL_UNSIGNED_BYTE, (void*)0); // Only shows with GL_UNSIGNED_BYTE
      glDrawArrays(GL_LINES, 0, g_pGame->m_vertexCount);
      So, I'm asking what type should I use for the indices? it doesn't seem to be unsigned short, which is what I selected with the Khronos Group Exporter for blender. Also, am I reading part or all of the .bin file wrong?
    • By ritzmax72
      That means how do I use base DirectX or OpenGL api's to make a physics based destruction simulation? 
      Will it be just smart rendering or something else is required?
    • By jsquare89
      I am somewhat new to game development and trying to create a basic 3d engine. I have managed to set up a first person camera and it seems to be working fine for the most part. While I am able to look up, down, left and right just fine the camera is constrained to the mouse movement in the window (i.e when the mouse reaches edges of the window it discontinues camera rotation and mouse is out of window bounds. I tried to use SDL_WarpMouseInWindow(window, center.x,center.y) but when I do this then it messes up the camera and the camera is stuck, even though there is some slight movement of the camera, it keeps going back to the center.
      void Camera::UpdateViewByMouse(SDL_Window &window, glm::vec2 mousePosition)
      float xDistanceFromWindowCenter = mousePosition.x - ((float)1024 / 2) ;
      float yDistanceFromWindowCenter = ((float)720 / 2) - mousePosition.y;
      yaw = xDistanceFromWindowCenter * cameraRotationSpeed;
      pitch = yDistanceFromWindowCenter * cameraRotationSpeed;
      SDL_WarpMouseInWindow(&window, 1024 / 2, 768 / 2); }
      i’ve been stuck on this for far too long. any help would be much appreciated
      i have also tried relative mouse movement,  and .xrel and .yrel to avail. polling mouse state with sdl_event. I do also know that SDL_WarpMouseInWindow makes change to event and have tried also ignore and reenabling to no avail
  • Advertisement
  • Advertisement
Sign in to follow this  

OpenGL Direct3D 9 - NVidia works, ATI fails

This topic is 2001 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone,

Last week, I developed a small rendering task for a technical test (I won't say the company name neither the complete topic, for confidential reasons).

I finished the test in time, but for a strange reason it perfeclty works on NVidia hardware, but not on ATI hardware. The rendering is done in a right-handed environment, because it must be compatible with both Direct3D and OpenGL.

I tried to have a look at PIX, and all is fine (index buffers, streams, textures, shaders, render state...). The vertex shader works well (tried to look at the different steps of a single mesh rendering), but the rasterizer seems to discard all the triangles, and it seems that the pixel shader is never called (if I right click a pixel and select "debug this pixel", I have nothing excepted the "clear" pixel setting). Sometimes, I read "this pixel has been discarded for the following reason : did not pass the alpha test", but there is no vertex shader/pixel shader to debug. Also, the alpha test is set to false, and the func is set to "always" !

Is there something I missed in the process ?

If you need more info that can help me solve the problem, just ask me for them and I'll give you what you need smile.png

Thanks in advance smile.png


(PS : the D3D9 debug mode tells me that the ATI driver does not support index buffers ("(info) : failed to create driver index buffer"), so I tried primitive rendering without indices but it still draws nothing. Trying to update my ATI driver brought me to a blue screen)

Share this post

Link to post
Share on other sites
You're likely performing some operation which isn't strictly valid, but is allowed by the nVidia driver.

Which shader models are you using? Are you mixing VS2 with PS3?
Which GPU models are you testing?
Use the DirectX control panel to enable to Debug version of Direct3D 9, turn output level up to one-step-below maximum, tick Maximum Validation and Break on D3D9 Error, and run the game from your IDE/Debugger to monitor for output messages and/or crashes.

Share this post

Link to post
Share on other sites
Hi Hodgman,

thanks for your answer, I always knew NVidia was more indulgent than ATI ^^

I am exclusively using SM 3.0
my NVidia GPU is GTX 470
my ATI GPU is HD 5750

Here is my output log with my ATI device used :

'RenderingTask.exe': Loaded 'S:\Havok\Out\Win32\Debug D3D9\RenderingTask.exe', Symbols loaded.
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll'
'RenderingTask.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_2a4f639a55563668\msvcp90d.dll', Symbols loaded.
'RenderingTask.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_2a4f639a55563668\msvcr90d.dll', Symbols loaded.
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\d3d9.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\version.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\d3d8thk.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\D3dx9d_43.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll'
'RenderingTask.exe': Loaded 'C:\Program Files (x86)\DisplayFusion\Hooks\DisplayFusionHookx86_af572312-ca22-4a6a-ba57-d87af4583ea5.dll', Binary was not built with debug information.
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\d3d9d.dll'
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\nvd3dum.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\aticfx32.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\atiu9pag.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\atiumdag.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\atiumdva.dll'
'RenderingTask.exe': Unloaded 'C:\Windows\SysWOW64\atiumdva.dll'
'RenderingTask.exe': Unloaded 'C:\Windows\SysWOW64\atiumdag.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\atiumdag.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\atiumdva.dll'
D3D9 Helper: Enhanced D3DDebugging disabled; Application was not compiled with D3D_DEBUG_INFO
Direct3D9: (INFO) :======================= Hal HWVP device selected
Direct3D9: (INFO) :HalDevice Driver Style b
Direct3D9: (INFO) :Using FF to VS converter
Direct3D9: (INFO) :Using FF to PS converter
D3DX: Unicode support: 1
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'
'RenderingTask.exe': Unloaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'
'RenderingTask.exe': Loaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'
'RenderingTask.exe': Unloaded 'C:\Windows\SysWOW64\D3DCompiler_43.dll'
Direct3D9: (INFO) :Failed to create driver indexbuffer
D3DX: (INFO) Using SSE2 optimizations
D3DX: Matrix should be 16-byte aligned for better performance
The thread 'Win32 Thread' (0x1788) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1244) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1798) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1348) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x10c8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1458) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x11e8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x105c) has exited with code 0 (0x0).
Direct3D9: (INFO) :MemFini!
Direct3D9: (ERROR) :Memory still allocated! Alloc count = 215
Direct3D9: (ERROR) :Current Process (pid) = 000016e8
Direct3D9: (ERROR) :Memory Address: 010707fc lAllocID=1 dwSize=00004bc4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 010753f4 lAllocID=2 dwSize=00000350, ReturnAddr=54c602fa (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107577c lAllocID=3 dwSize=00000ef0, ReturnAddr=54c66401 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a974a4 lAllocID=5 dwSize=00027408, ReturnAddr=54c6e508 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00abe8e4 lAllocID=6 dwSize=00001fa4, ReturnAddr=54c5ec04 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00ac08bc lAllocID=7 dwSize=00000320, ReturnAddr=54c5ecd5 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00ac0c14 lAllocID=8 dwSize=00000018, ReturnAddr=54c5ed27 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a70064 lAllocID=25 dwSize=00001d1c, ReturnAddr=54c53cab (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 010766a4 lAllocID=26 dwSize=00000320, ReturnAddr=54c53cf1 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076e7c lAllocID=27 dwSize=00000018, ReturnAddr=54c53d3e (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a71db4 lAllocID=28 dwSize=00000350, ReturnAddr=54c602fa (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7213c lAllocID=29 dwSize=00000ef0, ReturnAddr=54c66401 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00ac0fc4 lAllocID=31 dwSize=0001c384, ReturnAddr=54c6e508 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a73064 lAllocID=32 dwSize=00001c44, ReturnAddr=54c5ec04 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00add37c lAllocID=33 dwSize=00000560, ReturnAddr=54c5ecd5 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076ecc lAllocID=34 dwSize=00000014, ReturnAddr=54c5ed27 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a74cdc lAllocID=36 dwSize=000019bc, ReturnAddr=54c53cab (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00add914 lAllocID=37 dwSize=00000560, ReturnAddr=54c53cf1 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076f14 lAllocID=38 dwSize=00000014, ReturnAddr=54c53d3e (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a76a54 lAllocID=46 dwSize=00000ef0, ReturnAddr=54c66401 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076f5c lAllocID=47 dwSize=00000030, ReturnAddr=54c70881 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7797c lAllocID=48 dwSize=00001c44, ReturnAddr=54c5ec04 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a795f4 lAllocID=49 dwSize=00000560, ReturnAddr=54c5ecd5 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00addeac lAllocID=50 dwSize=00000014, ReturnAddr=54c5ed27 (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a79b8c lAllocID=52 dwSize=00004138, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 010769fc lAllocID=53 dwSize=00000198, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076bcc lAllocID=54 dwSize=00000030, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7dcfc lAllocID=55 dwSize=00001020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7ed54 lAllocID=56 dwSize=00000a48, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00addef4 lAllocID=57 dwSize=00000098, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a766cc lAllocID=58 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7677c lAllocID=59 dwSize=00000024, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a767d4 lAllocID=60 dwSize=00000098, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a768a4 lAllocID=61 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a76954 lAllocID=62 dwSize=00000044, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a769cc lAllocID=63 dwSize=00000024, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7f7d4 lAllocID=64 dwSize=000000a8, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7f8b4 lAllocID=65 dwSize=00000098, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7f984 lAllocID=66 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00addfc4 lAllocID=67 dwSize=0002b330, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b0932c lAllocID=68 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b0938c lAllocID=69 dwSize=00000028, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b093ec lAllocID=70 dwSize=00000420, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09844 lAllocID=71 dwSize=00000030, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b098ac lAllocID=72 dwSize=00000030, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a7fa34 lAllocID=73 dwSize=00001020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09914 lAllocID=74 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09a6c lAllocID=75 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a80a8c lAllocID=76 dwSize=00000e20, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09b04 lAllocID=77 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09c5c lAllocID=78 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a818e4 lAllocID=79 dwSize=000003ec, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09cf4 lAllocID=80 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09d7c lAllocID=81 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09e04 lAllocID=82 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09e8c lAllocID=83 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09f14 lAllocID=84 dwSize=00000048, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a81d04 lAllocID=85 dwSize=00000054, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a81d8c lAllocID=86 dwSize=00000048, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a81e0c lAllocID=89 dwSize=000000b8, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a81efc lAllocID=90 dwSize=00010020, ReturnAddr=54c5d65a (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a91f54 lAllocID=91 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a92004 lAllocID=92 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a920fc lAllocID=93 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a921ac lAllocID=94 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a922a4 lAllocID=95 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a92354 lAllocID=96 dwSize=000000b0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a9243c lAllocID=97 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a924ec lAllocID=98 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09f94 lAllocID=99 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a92574 lAllocID=100 dwSize=00000028, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a925d4 lAllocID=101 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 01076fc4 lAllocID=102 dwSize=0000517c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a92634 lAllocID=103 dwSize=00001020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c174 lAllocID=104 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b09ff4 lAllocID=105 dwSize=00004020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c1e4 lAllocID=106 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a9368c lAllocID=107 dwSize=0000183c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b0e04c lAllocID=108 dwSize=0000fab8, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c254 lAllocID=109 dwSize=00000068, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c2f4 lAllocID=110 dwSize=00000140, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c46c lAllocID=111 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b1db3c lAllocID=112 dwSize=00004020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c4dc lAllocID=113 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b21b94 lAllocID=114 dwSize=0000183c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c54c lAllocID=115 dwSize=0000021c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b23404 lAllocID=116 dwSize=0002b044, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c79c lAllocID=117 dwSize=00000028, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107c7fc lAllocID=118 dwSize=00000224, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ca54 lAllocID=119 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cac4 lAllocID=120 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cc2c lAllocID=122 dwSize=00000050, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ccb4 lAllocID=123 dwSize=00000038, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cd24 lAllocID=124 dwSize=00000080, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cddc lAllocID=125 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ce3c lAllocID=126 dwSize=00000040, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ceb4 lAllocID=127 dwSize=00000040, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cf2c lAllocID=128 dwSize=00000040, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4e47c lAllocID=129 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4e514 lAllocID=130 dwSize=00000030, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4e57c lAllocID=131 dwSize=00000b38, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a94efc lAllocID=132 dwSize=00001020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f0ec lAllocID=133 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f244 lAllocID=134 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a95f54 lAllocID=135 dwSize=00001020, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a96fac lAllocID=136 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a97104 lAllocID=137 dwSize=00000060, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f2dc lAllocID=138 dwSize=00000420, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a9719c lAllocID=139 dwSize=000000e4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cfa4 lAllocID=140 dwSize=00000028, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107d004 lAllocID=201 dwSize=000008b4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107d8ec lAllocID=202 dwSize=00000254, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a972b4 lAllocID=203 dwSize=00000034, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107dd14 lAllocID=211 dwSize=0000002a, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a9731c lAllocID=213 dwSize=00000038, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a9738c lAllocID=214 dwSize=00000084, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107db74 lAllocID=215 dwSize=00000074, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107dd74 lAllocID=216 dwSize=00000268, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00a97444 lAllocID=217 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107e014 lAllocID=218 dwSize=000006fc, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107e744 lAllocID=284 dwSize=000002c8, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107dc1c lAllocID=285 dwSize=00000034, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ea44 lAllocID=286 dwSize=0000017c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ee64 lAllocID=294 dwSize=0000002a, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ebf4 lAllocID=295 dwSize=00000070, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107ec9c lAllocID=296 dwSize=00000190, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107dc84 lAllocID=297 dwSize=0000002c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107eec4 lAllocID=298 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0683003c lAllocID=299 dwSize=00155574, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f01c lAllocID=300 dwSize=00000048, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f1c4 lAllocID=302 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f274 lAllocID=303 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f324 lAllocID=304 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f3d4 lAllocID=305 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f484 lAllocID=306 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f534 lAllocID=307 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f5e4 lAllocID=308 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f694 lAllocID=309 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f744 lAllocID=310 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f7f4 lAllocID=311 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f09c lAllocID=312 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f10c lAllocID=313 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f8a4 lAllocID=314 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f914 lAllocID=315 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f984 lAllocID=316 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f9f4 lAllocID=317 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fa64 lAllocID=318 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fad4 lAllocID=319 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fb44 lAllocID=320 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fbb4 lAllocID=321 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fc24 lAllocID=322 dwSize=00000040, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fc9c lAllocID=323 dwSize=000001a0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107fe74 lAllocID=325 dwSize=00000040, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107feec lAllocID=326 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f734 lAllocID=327 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f7e4 lAllocID=328 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f8dc lAllocID=329 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4f98c lAllocID=330 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fa84 lAllocID=331 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fb34 lAllocID=332 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fc2c lAllocID=333 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fcdc lAllocID=334 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fdd4 lAllocID=335 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4fe84 lAllocID=336 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b4ff7c lAllocID=337 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5002c lAllocID=338 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50124 lAllocID=339 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b501d4 lAllocID=340 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b502cc lAllocID=341 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5037c lAllocID=342 dwSize=000000c0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50474 lAllocID=343 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50524 lAllocID=346 dwSize=000000a8, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50604 lAllocID=347 dwSize=00000068, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b506a4 lAllocID=348 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107f17c lAllocID=349 dwSize=00000010, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50754 lAllocID=350 dwSize=00000120, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b508ac lAllocID=351 dwSize=00000048, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50a54 lAllocID=353 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50b04 lAllocID=354 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50bb4 lAllocID=355 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50c64 lAllocID=356 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50d14 lAllocID=357 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50dc4 lAllocID=358 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50e74 lAllocID=359 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50f24 lAllocID=360 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b50fd4 lAllocID=361 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51084 lAllocID=362 dwSize=0000007c, ReturnAddr=54c7a22b (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5092c lAllocID=363 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5099c lAllocID=364 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51134 lAllocID=365 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b511a4 lAllocID=366 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51214 lAllocID=367 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51284 lAllocID=368 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b512f4 lAllocID=369 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51364 lAllocID=370 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b513d4 lAllocID=371 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b51444 lAllocID=372 dwSize=0000003c, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 06586584 lAllocID=398 dwSize=00000420, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5228c lAllocID=426 dwSize=00000054, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b52314 lAllocID=427 dwSize=00000080, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b52b6c lAllocID=456 dwSize=00000114, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b52cb4 lAllocID=457 dwSize=000003e4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b530cc lAllocID=458 dwSize=000001a4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b532a4 lAllocID=459 dwSize=00000170, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0107cb5c lAllocID=460 dwSize=00000064, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5344c lAllocID=461 dwSize=00000064, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b534e4 lAllocID=462 dwSize=000000f0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5360c lAllocID=463 dwSize=000000ac, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b536ec lAllocID=464 dwSize=000001a4, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b538c4 lAllocID=465 dwSize=00000170, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b53a6c lAllocID=466 dwSize=00000064, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 06586e5c lAllocID=467 dwSize=00000064, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 06586c34 lAllocID=469 dwSize=000000f0, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 00b5184c lAllocID=471 dwSize=000000ac, ReturnAddr=54c5d5ea (pid=000016e8)
Direct3D9: (ERROR) :Memory Address: 0658646c lAllocID=486 dwSize=0000007c, ReturnAddr=54c7b592 (pid=000016e8)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 2377360 bytes
D3DX: MEMORY LEAKS DETECTED: 17 allocations unfreed (1528 bytes)
D3DX: Set HKLM\Software\Microsoft\Direct3D\D3DXBreakOnAllocId=0xa to debug
The program '[5864] RenderingTask.exe: Native' has exited with code 0 (0x0).

As you can see, the driver does not like the index buffer:
"Direct3D9: (INFO) :Failed to create driver indexbuffer"

After that, no apparent error located but a memory leak (still didn't find where it came from)

Share this post

Link to post
Share on other sites
Google search suggests the error 'Direct3D9: (INFO) :Failed to create driver indexbuffer' might signify the driver failed to create a hardware index buffer. I notice you've selected HW vertex processing. Could you try changing that and see if your rendering task works?

Share this post

Link to post
Share on other sites
Yes, I also googled this message, and found similar topics, quite all saying that I don't have to matter this :S

Already tried Sw VP and mixed VP, no differences... it seems that direct3D automatically set the index buffer in central memory, PIX giving me a good index buffer...

and as already said, the vertex shader properly handles the vertices...

WTH is going on ??

This may be a general issue in my programming methods, because quite all of my developments don't work with ATI (only my screen saver works !)

Share this post

Link to post
Share on other sites
I'm sorry, I don't have any intel integrated GPU to test the application :(

perhaps :

Is there a difference between DrawIndexedPrimitive and DrawIndexedPrimitiveUP ?
It seems that the D3DXMesh interface uses the second call to draw the subsets, but I personally use the first version for my rendering task (for optimization reasons)

Share this post

Link to post
Share on other sites
We just tested it on an Intel GPU (integrated GPU on an ivy bridge processor), and it works perfectly...

Share this post

Link to post
Share on other sites
How are you creating the index buffer in question? I would concentrate more closely on that...

Share this post

Link to post
Share on other sites
I had a bug in the index buffer creation at the beginning (memory overflow), but it has been solved some time ago (before that, the application directly crashed when running on ATI/AMD runtime...).

Here is my index buffer creation and filling code:

[source lang="cpp"] /*... creating streams... */

m_pDevice->CreateIndexBuffer(sizeof(short) * 12 * 3, D3DUSAGE_WRITEONLY, D3DFMT_INDEX16, D3DPOOL_DEFAULT, &m_pIndices, NULL); // 12 faces, 3 vertices

/*... filling streams... */

m_pIndices->Lock(0, sizeof(short) * 12 * 3, (void **)&pIData, 0);
for (cpt = 0; cpt < 12 * 3; ++cpt)
pIData[cpt] = ((short *)skCubeIndexStream)[cpt];

Then, here is my "skCybeIndexStream" variable contents :

[source lang="cpp"]// the index stream
// 12 faces of 3 vertices each
short const skCubeIndexStream[12][3] =
/* vert1 vert2 vert3 */
{ 0, 1, 2, },
{ 2, 3, 0, },
{ 4, 5, 6, },
{ 6, 7, 4, },

{ 8, 9, 10, },
{ 10, 11, 8, },
{ 12, 13, 14, },
{ 14, 15, 12, },

{ 16, 17, 18, },
{ 18, 19, 16, },
{ 20, 21, 22, },
{ 22, 23, 20, }

And finally, my device creation code (we never know...)

[source lang="cpp"] // locals
unsigned int cpt; // looper variable
unsigned int nbAdapters; // number of available adapterss
D3DCAPS9 caps; // current device caps
D3DPRESENT_PARAMETERS params; // params to give to device creation
unsigned int retCode; // device creation return code

// here, we construct the main D3D9 object, and then try to create the device
m_pObject = Direct3DCreate9(D3D_SDK_VERSION);
if (!m_pObject)
MessageBox(window, L"Failed to create the Direct3D 9 main object", L"error", MB_OK);

// now, prepare the device creation
// the first step is to parse all devices and find the first that matches the Shader model 3.0
nbAdapters = m_pObject->GetAdapterCount();

for (cpt = 0; cpt < nbAdapters; ++cpt)
// get device caps (as HAL device for each one)
m_pObject->GetDeviceCaps(cpt, D3DDEVTYPE_HAL, &caps);

if (((caps.VertexShaderVersion & 0xFF00) >> 8) >= 3 &&
((caps.PixelShaderVersion & 0xFF00) >> 8) >= 3)
break; // compatible with shader model 3.0 (we assume then that the other needed caps are here, because more ancient)

//cpt = 1; // for ATI

// if no device is avaiable
if (cpt == nbAdapters)
MessageBox(window, L"Failed to initialize Direct3D engine : no shader model 3.0 compatible hardware found.", L"Error", MB_OK);
return false;

// prepare the structure for device creation
params.AutoDepthStencilFormat = D3DFMT_D16; // no need of stencil buffer
params.BackBufferCount = 1;
params.BackBufferFormat = D3DFMT_A8R8G8B8;
params.BackBufferHeight = height;
params.BackBufferWidth = width;
params.EnableAutoDepthStencil = true;
params.Flags = 0;
params.FullScreen_RefreshRateInHz = 0;
params.hDeviceWindow = window;
params.MultiSampleQuality = 0;
params.MultiSampleType = D3DMULTISAMPLE_NONE;
params.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
params.SwapEffect = D3DSWAPEFFECT_DISCARD;
params.Windowed = true;

// finally, try to create the device
if (FAILED(retCode = m_pObject->CreateDevice(cpt, D3DDEVTYPE_HAL, window, D3DCREATE_PUREDEVICE | D3DCREATE_HARDWARE_VERTEXPROCESSING, &params, &m_pDevice)))
MessageBox(window, L"Failed to initialize the Direct3D 9 Device : device lost", L"Error", MB_OK);
MessageBox(window, L"Failed to initialize the Direct3D 9 Device : invalid call", L"Error", MB_OK);
MessageBox(window, L"Failed to initialize the Direct3D 9 Device : device not available", L"Error", MB_OK);
MessageBox(window, L"Failed to initialize the Direct3D 9 Device : out of video memory !", L"Error", MB_OK);
return false;

Hope this will give ideas ^^

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement