diff options
author | Alok Hota <[email protected]> | 2018-05-25 10:19:48 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2018-05-25 10:56:55 -0500 |
commit | b3360f5c8b74906187a8801d83f2c4f73f3c025e (patch) | |
tree | 990950cca73bb50ce2570fab228586918bca5bd2 /src/gallium/drivers/swr/rasterizer | |
parent | b6b114c1aeaa996a4bf8c1fd409e8141d18b120c (diff) |
swr/rast: Moved memory init out of core swr init
Added two new files for a wrapper function for initialization
v2: added missing include for single architecture builds
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer')
4 files changed, 74 insertions, 5 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp index 47f3633d54b..c932ec0bd66 100644 --- a/src/gallium/drivers/swr/rasterizer/core/api.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp @@ -1728,10 +1728,6 @@ void InitBackendFuncTables(); /// @brief Initialize swr backend and memory internal tables void SwrInit() { - InitSimLoadTilesTable(); - InitSimStoreTilesTable(); - InitSimClearTilesTable(); - InitClearTilesTable(); InitBackendFuncTables(); InitRasterizerFunctions(); diff --git a/src/gallium/drivers/swr/rasterizer/core/state.h b/src/gallium/drivers/swr/rasterizer/core/state.h index c26dabe8383..9db17eeed01 100644 --- a/src/gallium/drivers/swr/rasterizer/core/state.h +++ b/src/gallium/drivers/swr/rasterizer/core/state.h @@ -29,10 +29,11 @@ #include "common/formats.h" #include "common/intrin.h" -using gfxptr_t = unsigned long long; #include <functional> #include <algorithm> +using gfxptr_t = unsigned long long; + ////////////////////////////////////////////////////////////////////////// /// PRIMITIVE_TOPOLOGY. ////////////////////////////////////////////////////////////////////////// diff --git a/src/gallium/drivers/swr/rasterizer/memory/InitMemory.cpp b/src/gallium/drivers/swr/rasterizer/memory/InitMemory.cpp new file mode 100644 index 00000000000..bff96e17f43 --- /dev/null +++ b/src/gallium/drivers/swr/rasterizer/memory/InitMemory.cpp @@ -0,0 +1,39 @@ +/**************************************************************************** +* Copyright (C) 2018 Intel Corporation. All Rights Reserved. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +* @file InitMemory.cpp +* +* @brief Provide access to tiles table initialization functions +* +******************************************************************************/ +#include "memory/InitMemory.h" + +void InitSimLoadTilesTable(); +void InitSimStoreTilesTable(); +void InitSimClearTilesTable(); + +void InitTilesTable() +{ + InitSimLoadTilesTable(); + InitSimStoreTilesTable(); + InitSimClearTilesTable(); +} diff --git a/src/gallium/drivers/swr/rasterizer/memory/InitMemory.h b/src/gallium/drivers/swr/rasterizer/memory/InitMemory.h new file mode 100644 index 00000000000..14cca6ab324 --- /dev/null +++ b/src/gallium/drivers/swr/rasterizer/memory/InitMemory.h @@ -0,0 +1,33 @@ +/**************************************************************************** +* Copyright (C) 2018 Intel Corporation. All Rights Reserved. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice (including the next +* paragraph) shall be included in all copies or substantial portions of the +* Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +* IN THE SOFTWARE. +* +* @file InitMemory.h +* +* @brief Provide access to tiles table initialization functions +* +******************************************************************************/ +#include "common/os.h" + +extern "C" +{ + SWR_VISIBLE void SWR_API InitTilesTable(); +} |