summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/d3d12/d3d12_context.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/d3d12/d3d12_context.cpp b/src/gallium/drivers/d3d12/d3d12_context.cpp
index cce9ffd6322..7f4c97e0b8b 100644
--- a/src/gallium/drivers/d3d12/d3d12_context.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_context.cpp
@@ -619,11 +619,12 @@ d3d12_create_sampler_state(struct pipe_context *pctx,
{
struct d3d12_context *ctx = d3d12_context(pctx);
struct d3d12_screen *screen = d3d12_screen(pctx->screen);
- struct d3d12_sampler_state *ss = CALLOC_STRUCT(d3d12_sampler_state);
+ struct d3d12_sampler_state *ss;
D3D12_SAMPLER_DESC desc = {};
if (!state)
return NULL;
+ ss = CALLOC_STRUCT(d3d12_sampler_state);
ss->filter = (pipe_tex_filter)state->min_img_filter;
ss->wrap_r = (pipe_tex_wrap)state->wrap_r;
ss->wrap_s = (pipe_tex_wrap)state->wrap_s;