diff options
author | George Kyriazis <[email protected]> | 2017-02-10 10:24:32 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2017-02-23 16:36:13 -0600 |
commit | 669d8f626f64cee1bc74ef7869aac8585b6dcfe6 (patch) | |
tree | 981ce7c2e5a1b0c00c65745c71f60ef0f1d1a35d /src/gallium/drivers/swr/swr_state.h | |
parent | 987d8037cabaafaeba2cb8b82cb7fa7290dc4464 (diff) |
swr: add fetch shader cache
For now, the cache key is all of FETCH_COMPILE_STATE.
Use new/delete for swr_vertex_element_state, since we have to call the
constructors/destructors of the struct elements.
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_state.h')
-rw-r--r-- | src/gallium/drivers/swr/swr_state.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/swr/swr_state.h b/src/gallium/drivers/swr/swr_state.h index 1960abddfa6..202f16547f9 100644 --- a/src/gallium/drivers/swr/swr_state.h +++ b/src/gallium/drivers/swr/swr_state.h @@ -70,10 +70,11 @@ struct swr_fragment_shader { /* Vertex element state */ struct swr_vertex_element_state { FETCH_COMPILE_STATE fsState; - PFN_FETCH_FUNC fsFunc; - uint32_t stream_pitch[PIPE_MAX_ATTRIBS]; - uint32_t min_instance_div[PIPE_MAX_ATTRIBS]; - uint32_t instanced_bufs; + PFN_FETCH_FUNC fsFunc {NULL}; + uint32_t stream_pitch[PIPE_MAX_ATTRIBS] {0}; + uint32_t min_instance_div[PIPE_MAX_ATTRIBS] {0}; + uint32_t instanced_bufs {0}; + std::unordered_map<swr_jit_fetch_key, PFN_FETCH_FUNC> map; }; struct swr_blend_state { |