rasterizer/memory/StoreTile_TileY2.cpp \
rasterizer/memory/StoreTile_TileY.cpp \
rasterizer/memory/TilingFunctions.h \
- rasterizer/memory/tilingtraits.h
+ rasterizer/memory/tilingtraits.h \
+ rasterizer/memory/InitMemory.cpp \
+ rasterizer/memory/InitMemory.h
'rasterizer/memory/StoreTile_TileY.cpp',
'rasterizer/memory/TilingFunctions.h',
'rasterizer/memory/tilingtraits.h',
+ 'rasterizer/memory/InitMemory.h',
+ 'rasterizer/memory/InitMemory.cpp',
)
swr_context_files = files('swr_context.h')
/// @brief Initialize swr backend and memory internal tables
void SwrInit()
{
- InitSimLoadTilesTable();
- InitSimStoreTilesTable();
- InitSimClearTilesTable();
-
InitClearTilesTable();
InitBackendFuncTables();
InitRasterizerFunctions();
#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.
//////////////////////////////////////////////////////////////////////////
--- /dev/null
+/****************************************************************************
+* 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();
+}
--- /dev/null
+/****************************************************************************
+* 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();
+}
* IN THE SOFTWARE.
***************************************************************************/
+#include "memory/InitMemory.h"
#include "util/u_cpu_detect.h"
#include "util/u_dl.h"
#include "swr_public.h"
#ifdef HAVE_SWR_BUILTIN
screen->pLibrary = NULL;
screen->pfnSwrGetInterface = SwrGetInterface;
+ InitTilesTable();
fprintf(stderr, "(using: builtin).\n");
#else
char filename[256] = { 0 };
util_dl_proc pApiProc = util_dl_get_proc_address(screen->pLibrary,
"SwrGetInterface");
- if (!pApiProc) {
+ util_dl_proc pInitFunc = util_dl_get_proc_address(screen->pLibrary,
+ "InitTilesTable");
+ if (!pApiProc || !pInitFunc) {
fprintf(stderr, "(skipping: %s).\n", util_dl_error());
util_dl_close(screen->pLibrary);
screen->pLibrary = NULL;
}
screen->pfnSwrGetInterface = (PFNSwrGetInterface)pApiProc;
+ pInitFunc();
+
fprintf(stderr, "(using: %s).\n", filename);
#endif
return true;