[VP] Refine folder layout for mhw_render
Refactor on mhw_render for removal of ELG legacy code dependency.
1. rename related class to MhwRenderInterfaceGxx_x, e.g. MhwRenderInterfaceG12_5_Plus
2. Add MhwRenderInterfaceG12_5_Plus class which is base on MhwRenderInterfaceG12 and derived by MhwRenderInterfaceG12_5.
diff --git a/media_driver/agnostic/g12/g12_base/hw/media_srcs.cmake b/media_driver/agnostic/g12/g12_base/hw/media_srcs.cmake
new file mode 100644
index 0000000..9d1c3d3
--- /dev/null
+++ b/media_driver/agnostic/g12/g12_base/hw/media_srcs.cmake
@@ -0,0 +1,21 @@
+# Copyright (c) 2021, Intel Corporation
+
+# 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 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.
+
+media_include_subdirectory(render)
diff --git a/media_driver/agnostic/g12/g12_base/hw/render/media_srcs.cmake b/media_driver/agnostic/g12/g12_base/hw/render/media_srcs.cmake
new file mode 100644
index 0000000..b4cf38c
--- /dev/null
+++ b/media_driver/agnostic/g12/g12_base/hw/render/media_srcs.cmake
@@ -0,0 +1,53 @@
+# Copyright (c) 2021, Intel Corporation
+
+# 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 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.
+
+set(TMP_RENDER_SOURCES_
+ ${CMAKE_CURRENT_LIST_DIR}/mhw_render_g12_X.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/mhw_render_hwcmd_g12_X.cpp
+)
+
+set(TMP_RENDER_HEADERS_
+ ${CMAKE_CURRENT_LIST_DIR}/mhw_render_g12_X.h
+ ${CMAKE_CURRENT_LIST_DIR}/mhw_render_hwcmd_g12_X.h
+)
+
+set(SOURCES_
+ ${SOURCES_}
+ ${TMP_RENDER_SOURCES_}
+)
+
+set(HEADERS_
+ ${HEADERS_}
+ ${TMP_RENDER_HEADERS_}
+)
+
+set(COMMON_SOURCES_
+ ${COMMON_SOURCES_}
+ ${TMP_RENDER_SOURCES_}
+)
+
+set(COMMON_HEADERS_
+ ${COMMON_HEADERS_}
+ ${TMP_RENDER_HEADERS_}
+)
+
+source_group("MHW\\Render Engine" FILES ${TMP_RENDER_SOURCES_} ${TMP_RENDER_HEADERS_})
+
+media_add_curr_to_include_path()
diff --git a/media_driver/agnostic/gen12/hw/mhw_render_g12_X.cpp b/media_driver/agnostic/g12/g12_base/hw/render/mhw_render_g12_X.cpp
similarity index 100%
rename from media_driver/agnostic/gen12/hw/mhw_render_g12_X.cpp
rename to media_driver/agnostic/g12/g12_base/hw/render/mhw_render_g12_X.cpp
diff --git a/media_driver/agnostic/gen12/hw/mhw_render_g12_X.h b/media_driver/agnostic/g12/g12_base/hw/render/mhw_render_g12_X.h
similarity index 100%
rename from media_driver/agnostic/gen12/hw/mhw_render_g12_X.h
rename to media_driver/agnostic/g12/g12_base/hw/render/mhw_render_g12_X.h
diff --git a/media_driver/agnostic/gen12/hw/mhw_render_hwcmd_g12_X.cpp b/media_driver/agnostic/g12/g12_base/hw/render/mhw_render_hwcmd_g12_X.cpp
similarity index 100%
rename from media_driver/agnostic/gen12/hw/mhw_render_hwcmd_g12_X.cpp
rename to media_driver/agnostic/g12/g12_base/hw/render/mhw_render_hwcmd_g12_X.cpp
diff --git a/media_driver/agnostic/gen12/hw/mhw_render_hwcmd_g12_X.h b/media_driver/agnostic/g12/g12_base/hw/render/mhw_render_hwcmd_g12_X.h
similarity index 100%
rename from media_driver/agnostic/gen12/hw/mhw_render_hwcmd_g12_X.h
rename to media_driver/agnostic/g12/g12_base/hw/render/mhw_render_hwcmd_g12_X.h
diff --git a/media_driver/agnostic/g12/g12_base/media_srcs.cmake b/media_driver/agnostic/g12/g12_base/media_srcs.cmake
new file mode 100644
index 0000000..f4e7fd1
--- /dev/null
+++ b/media_driver/agnostic/g12/g12_base/media_srcs.cmake
@@ -0,0 +1,21 @@
+# Copyright (c) 2021, Intel Corporation
+
+# 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 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.
+
+media_include_subdirectory(hw)
diff --git a/media_driver/agnostic/g12/media_srcs.cmake b/media_driver/agnostic/g12/media_srcs.cmake
new file mode 100644
index 0000000..e48f1c4
--- /dev/null
+++ b/media_driver/agnostic/g12/media_srcs.cmake
@@ -0,0 +1,21 @@
+# Copyright (c) 2021, Intel Corporation
+
+# 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 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.
+
+media_include_subdirectory(g12_base)
diff --git a/media_driver/agnostic/gen12/hw/media_srcs.cmake b/media_driver/agnostic/gen12/hw/media_srcs.cmake
index f455c92..2c2b06f 100644
--- a/media_driver/agnostic/gen12/hw/media_srcs.cmake
+++ b/media_driver/agnostic/gen12/hw/media_srcs.cmake
@@ -21,117 +21,101 @@
media_include_subdirectory(vdbox)
-set(TMP_1_SOURCES_
+set(TMP_SFC_SOURCES_
${CMAKE_CURRENT_LIST_DIR}/mhw_sfc_g12_X.cpp
${CMAKE_CURRENT_LIST_DIR}/mhw_sfc_hwcmd_g12_X.cpp
)
-set(TMP_1_HEADERS_
+set(TMP_SFC_HEADERS_
${CMAKE_CURRENT_LIST_DIR}/mhw_sfc_g12_X.h
${CMAKE_CURRENT_LIST_DIR}/mhw_sfc_hwcmd_g12_X.h
)
-set(TMP_2_SOURCES_
+set(TMP_VEBOX_SOURCES_
${CMAKE_CURRENT_LIST_DIR}/mhw_vebox_g12_X.cpp
${CMAKE_CURRENT_LIST_DIR}/mhw_vebox_hwcmd_g12_X.cpp
)
-set(TMP_2_HEADERS_
+set(TMP_VEBOX_HEADERS_
${CMAKE_CURRENT_LIST_DIR}/mhw_vebox_g12_X.h
${CMAKE_CURRENT_LIST_DIR}/mhw_vebox_hwcmd_g12_X.h
)
set(SOURCES_
${SOURCES_}
- ${TMP_1_SOURCES_}
- ${TMP_2_SOURCES_}
+ ${TMP_SFC_SOURCES_}
+ ${TMP_VEBOX_SOURCES_}
)
set(HEADERS_
${HEADERS_}
- ${TMP_1_HEADERS_}
- ${TMP_2_HEADERS_}
+ ${TMP_SFC_HEADERS_}
+ ${TMP_VEBOX_HEADERS_}
)
set(COMMON_SOURCES_
${COMMON_SOURCES_}
- ${TMP_1_SOURCES_}
- ${TMP_2_SOURCES_}
+ ${TMP_SFC_SOURCES_}
+ ${TMP_VEBOX_SOURCES_}
)
set(COMMON_HEADERS_
${COMMON_HEADERS_}
- ${TMP_1_HEADERS_}
- ${TMP_2_HEADERS_}
+ ${TMP_SFC_HEADERS_}
+ ${TMP_VEBOX_HEADERS_}
)
-source_group("MHW\\SFC" FILES ${TMP_1_SOURCES_} ${TMP_1_HEADERS_})
-source_group("MHW\\VEBOX" FILES ${TMP_2_SOURCES_} ${TMP_2_HEADERS_})
+source_group("MHW\\SFC" FILES ${TMP_SFC_SOURCES_} ${TMP_SFC_HEADERS_})
+source_group("MHW\\VEBOX" FILES ${TMP_VEBOX_SOURCES_} ${TMP_VEBOX_HEADERS_})
-set(TMP_3_SOURCES_
+set(TMP_MI_SOURCES_
${CMAKE_CURRENT_LIST_DIR}/mhw_mi_g12_X.cpp
${CMAKE_CURRENT_LIST_DIR}/mhw_mi_hwcmd_g12_X.cpp
)
-set(TMP_3_HEADERS_
+set(TMP_MI_HEADERS_
${CMAKE_CURRENT_LIST_DIR}/mhw_mi_g12_X.h
${CMAKE_CURRENT_LIST_DIR}/mhw_mi_hwcmd_g12_X.h
${CMAKE_CURRENT_LIST_DIR}/mhw_mmio_g12.h
)
-set(TMP_4_SOURCES_
- ${CMAKE_CURRENT_LIST_DIR}/mhw_render_g12_X.cpp
- ${CMAKE_CURRENT_LIST_DIR}/mhw_render_hwcmd_g12_X.cpp
-)
-
-set(TMP_4_HEADERS_
- ${CMAKE_CURRENT_LIST_DIR}/mhw_render_g12_X.h
- ${CMAKE_CURRENT_LIST_DIR}/mhw_render_hwcmd_g12_X.h
-)
-
-set(TMP_5_SOURCES_
+set(TMP_STATE_HEAP_SOURCES_
${CMAKE_CURRENT_LIST_DIR}/mhw_state_heap_g12.c
${CMAKE_CURRENT_LIST_DIR}/mhw_state_heap_hwcmd_g12_X.cpp
)
-set(TMP_5_HEADERS_
+set(TMP_STATE_HEAP_HEADERS_
${CMAKE_CURRENT_LIST_DIR}/mhw_state_heap_g12.h
${CMAKE_CURRENT_LIST_DIR}/mhw_state_heap_hwcmd_g12_X.h
)
-
set(SOURCES_
${SOURCES_}
- ${TMP_3_SOURCES_}
- ${TMP_4_SOURCES_}
- ${TMP_5_SOURCES_}
+ ${TMP_MI_SOURCES_}
+ ${TMP_STATE_HEAP_SOURCES_}
)
set(HEADERS_
${HEADERS_}
- ${TMP_3_HEADERS_}
- ${TMP_4_HEADERS_}
- ${TMP_5_HEADERS_}
+ ${TMP_MI_HEADERS_}
+ ${TMP_STATE_HEAP_HEADERS_}
)
set(COMMON_SOURCES_
${COMMON_SOURCES_}
- ${TMP_3_SOURCES_}
- ${TMP_4_SOURCES_}
- ${TMP_5_SOURCES_}
+ ${TMP_MI_SOURCES_}
+ ${TMP_STATE_HEAP_SOURCES_}
)
set(COMMON_HEADERS_
${COMMON_HEADERS_}
- ${TMP_3_HEADERS_}
- ${TMP_4_HEADERS_}
- ${TMP_5_HEADERS_}
+ ${TMP_MI_HEADERS_}
+ ${TMP_STATE_HEAP_HEADERS_}
)
-source_group("MHW\\Common MI" FILES ${TMP_3_SOURCES_} ${TMP_3_HEADERS_})
-source_group("MHW\\Render Engine" FILES ${TMP_4_SOURCES_} ${TMP_4_HEADERS_})
-source_group("MHW\\State Heap" FILES ${TMP_5_SOURCES_} ${TMP_5_HEADERS_})
+source_group("MHW\\Common MI" FILES ${TMP_MI_SOURCES_} ${TMP_MI_HEADERS_})
+source_group("MHW\\State Heap" FILES ${TMP_STATE_HEAP_SOURCES_} ${TMP_STATE_HEAP_HEADERS_})
media_add_curr_to_include_path()
diff --git a/media_driver/agnostic/media_srcs.cmake b/media_driver/agnostic/media_srcs.cmake
index f9873a0..ba2d1b4 100755
--- a/media_driver/agnostic/media_srcs.cmake
+++ b/media_driver/agnostic/media_srcs.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2017, Intel Corporation
+# Copyright (c) 2017 - 2021, Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
@@ -388,6 +388,7 @@
if(GEN12)
media_include_subdirectory(gen12)
+ media_include_subdirectory(g12)
media_include_subdirectory(../media_driver_next/agnostic/gen12)
endif()