summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Bragg <robert@sixbynine.org>2011-03-08 00:25:38 +0000
committerRobert Bragg <robert@linux.intel.com>2012-01-16 13:45:27 +0000
commit11e603cf005705117876120b456fa1b8ce847c46 (patch)
treeb8bcb4f7a503e55a707897a9ba6b9baed7213f03 /src
parentb851bf8b356a0d1252bddaccbfd30c392352be4c (diff)
d3d1x: mesh::mesh() don't use index_format as factor
This fixes a typo whereby bufferd.ByteWidth was being calculated as (index_offset + index_format * num_indices) where index_format is a DXG1_FORMAT_ enum and what was surely intended was to multiply by index_size instead.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h
index 1e0ce04ca6..ee227262e9 100755
--- a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h
+++ b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h
@@ -110,7 +110,7 @@ struct mesh
bufferd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
if(index_format)
bufferd.BindFlags |= D3D11_BIND_INDEX_BUFFER;
- bufferd.ByteWidth = index_offset + index_format * num_indices;
+ bufferd.ByteWidth = index_offset + index_size * num_indices;
char* data = (char*)malloc(bufferd.ByteWidth);
memcpy(data, vertices, vertex_size * num_vertices);