diff options
author | Axel Davy <[email protected]> | 2015-01-03 11:29:40 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-01-22 22:16:24 +0000 |
commit | f8a74410f16b8a01da329975d10b631cb2a928e5 (patch) | |
tree | 760b425aab1147b809ddc534132581e1a5d9b26c /src/gallium/state_trackers/nine/device9.c | |
parent | e0f75044c8d2793b6a5bd9832c57c5d199822486 (diff) |
st/nine: Allocate vs constbuf buffer for indirect addressing once.
When the shader does indirect addressing on the constants,
we allocate a temporary constant buffer to which we copy
the constants from the app given user constants and
the constants filled in the shader.
This patch makes this buffer be allocated once.
Reviewed-by: Ilia Mirkin <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
Signed-off-by: Tiziano Bacocco <[email protected]>
Cc: "10.4" <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index dae7bd45767..ef3d2b0be58 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -267,7 +267,9 @@ NineDevice9_ctor( struct NineDevice9 *This, /* Include space for I,B constants for user constbuf. */ This->state.vs_const_f = CALLOC(This->vs_const_size, 1); This->state.ps_const_f = CALLOC(This->ps_const_size, 1); - if (!This->state.vs_const_f || !This->state.ps_const_f) + This->state.vs_lconstf_temp = CALLOC(This->vs_const_size,1); + if (!This->state.vs_const_f || !This->state.ps_const_f || + !This->state.vs_lconstf_temp) return E_OUTOFMEMORY; if (strstr(pScreen->get_name(pScreen), "AMD") || @@ -347,6 +349,7 @@ NineDevice9_dtor( struct NineDevice9 *This ) pipe_resource_reference(&This->constbuf_ps, NULL); FREE(This->state.vs_const_f); FREE(This->state.ps_const_f); + FREE(This->state.vs_lconstf_temp); if (This->swapchains) { for (i = 0; i < This->nswapchains; ++i) |