summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/swr/swr_state.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index f1f4963c259..116f19f1ecf 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -451,7 +451,7 @@ swr_create_vertex_elements_state(struct pipe_context *pipe,
{
struct swr_vertex_element_state *velems;
assert(num_elements <= PIPE_MAX_ATTRIBS);
- velems = CALLOC_STRUCT(swr_vertex_element_state);
+ velems = new swr_vertex_element_state;
if (velems) {
velems->fsState.bVertexIDOffsetEnable = true;
velems->fsState.numAttribs = num_elements;
@@ -521,8 +521,10 @@ swr_bind_vertex_elements_state(struct pipe_context *pipe, void *velems)
static void
swr_delete_vertex_elements_state(struct pipe_context *pipe, void *velems)
{
+ struct swr_vertex_element_state *swr_velems =
+ (struct swr_vertex_element_state *) velems;
/* XXX Need to destroy fetch shader? */
- FREE(velems);
+ delete swr_velems;
}