Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
anbox
提交
3fcdb31a
A
anbox
项目概览
openeuler
/
anbox
通知
24
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
anbox
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3fcdb31a
编写于
8月 31, 2017
作者:
S
Simon Fels
提交者:
Simon Fels
8月 31, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
emugl: import script for AOSP to generate encoding/decoding functions
上级
067201ba
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
153 addition
and
0 deletion
+153
-0
README.md
README.md
+1
-0
docs/generate-emugl-source.md
docs/generate-emugl-source.md
+16
-0
scripts/update-emugl-sources.sh
scripts/update-emugl-sources.sh
+136
-0
未找到文件。
README.md
浏览文件 @
3fcdb31a
...
...
@@ -192,6 +192,7 @@ Interesting things to have a look at
*
[
Runtime Setup
](
docs/runtime-setup.md
)
*
[
Build Android image
](
docs/build-android.md
)
*
[
Generate Android emugl source
](
docs/generate-emugl-source.md
)
## Reporting bugs
...
...
docs/generate-emugl-source.md
0 → 100644
浏览文件 @
3fcdb31a
# Generate Android EmuGL source
Parts of the EmuGL layer are generated with a tool called emugen (see
external/android-emugl/host/tools/emugen).
To generate the source again after a modification simply call
```
$ scripts/update-emugl-sources.sh --emugen=<path to emugen>/emugen
```
The definition of the various attributes/types/functions can be found in
*
external/android-emugl/host/libs/renderControl_dec
*
external/android-emugl/host/libs/GLESv1_dec
*
external/android-emugl/host/libs/GLESv2_dec
scripts/update-emugl-sources.sh
0 → 100755
浏览文件 @
3fcdb31a
#!/bin/sh
# Copyright 2014 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set
-e
export
LANG
=
C
export
LC_ALL
=
C
PROGDIR
=
$(
dirname
"
$0
"
)
PROGNAME
=
$(
basename
"
$0
"
)
fatal
()
{
echo
"ERROR:
$@
"
exit
1
}
ANBOX_DIR
=
"
$PWD
"
OPT_ANBOX_DIR
=
OPT_EMUGEN
=
OPT_HELP
=
for
OPT
;
do
OPTARG
=
$(
expr
"x
$OPT
"
:
"x[^=]*=
\\
(.*
\\
)"
||
true
)
case
$OPT
in
--help
|
-h
|
-
\?
)
OPT_HELP
=
true
;;
--anbox-dir
=
*
)
OPT_ANBOX_DIR
=
$OPTARG
;;
--emugen
=
*
)
OPT_EMUGEN
=
$OPTARG
;;
-
*
)
fatal
"Invalid option '
$OPT
', see --help."
;;
*
)
fatal
"This script doesn't take arguments, see --help."
;;
esac
done
if
[
"
$OPT_HELP
"
]
;
then
cat
<<
EOF
Usage:
$PROGNAME
[options]
Update the sources of the GPU emulation encoder and decoder, after an update
to the 'emugen' tool.
Valid options (defaults are in brackets):
--help|-h|-? Print this help.
--anbox-dir=<dir> Specify top-level Anbox directory [
$ANBOX_DIR
].
--emugen=<program> Emugen program path, if not in path.
EOF
exit
0
fi
EMUGEN
=
if
[
"
$OPT_EMUGEN
"
]
;
then
EMUGEN
=
$OPT_EMUGEN
if
[
!
-f
"
$EMUGEN
"
]
;
then
fatal
"Missing emugen binary:
$EMUGEN
"
fi
else
EMUGEN
=
$PROGDIR
/../../../objs/build/intermediates64/emugen/emugen
if
[
!
-f
"
$EMUGEN
"
]
;
then
fatal
"Missing emugen binary:
$EMUGEN
, please build it or use --emugen=<program>"
fi
echo
"Auto-config: --emugen=
$EMUGEN
"
fi
if
[
"
$OPT_ANBOX_DIR
"
]
;
then
ANBOX_DIR
=
$OPT_ANBOX_DIR
else
echo
"Auto-config: --anbox-dir=
$ANBOX_DIR
"
fi
if
[
!
-d
"
$ANBOX_DIR
/src/anbox"
]
;
then
fatal
"Not an Anbox directory:
$ANBOX_DIR
"
fi
ANBOX_DIR
=
$(
cd
"
$ANBOX_DIR
"
&&
pwd
-P
)
# Find the sources for the encoder:
ENCODER_TOP_DIR
=
$ANBOX_DIR
/android/opengl/system
DECODER_TOP_DIR
=
$ANBOX_DIR
/external/android-emugl/host/libs
if
[
!
-d
"
$ENCODER_TOP_DIR
"
]
;
then
fatal
"Missing encoder source directory:
$ENCODER_TOP_DIR
"
fi
if
[
!
-d
"
$DECODER_TOP_DIR
"
]
;
then
fatal
"Missing decoder source directory:
$DECODER_TOP_DIR
"
fi
# GLESv1 encoder
GLESv1_INPUT_DIR
=
$DECODER_TOP_DIR
/GLESv1_dec
GLESv2_INPUT_DIR
=
$DECODER_TOP_DIR
/GLESv2_dec
RENDERCONTROL_INPUT_DIR
=
$DECODER_TOP_DIR
/renderControl_dec
# The encoder has prefix GL while decoder has GLES
cp
-f
$DECODER_TOP_DIR
/GLESv1_dec/gles1.attrib
$DECODER_TOP_DIR
/GLESv1_dec/gl.attrib
cp
-f
$DECODER_TOP_DIR
/GLESv1_dec/gles1.in
$DECODER_TOP_DIR
/GLESv1_dec/gl.in
cp
-f
$DECODER_TOP_DIR
/GLESv1_dec/gles1.types
$DECODER_TOP_DIR
/GLESv1_dec/gl.types
cp
-f
$DECODER_TOP_DIR
/GLESv2_dec/gles2.attrib
$DECODER_TOP_DIR
/GLESv2_dec/gl2.attrib
cp
-f
$DECODER_TOP_DIR
/GLESv2_dec/gles2.in
$DECODER_TOP_DIR
/GLESv2_dec/gl2.in
cp
-f
$DECODER_TOP_DIR
/GLESv2_dec/gles2.types
$DECODER_TOP_DIR
/GLESv2_dec/gl2.types
$EMUGEN
-i
$DECODER_TOP_DIR
/GLESv1_dec
-E
$ENCODER_TOP_DIR
/GLESv1_enc gl
$EMUGEN
-i
$DECODER_TOP_DIR
/GLESv2_dec
-E
$ENCODER_TOP_DIR
/GLESv2_enc gl2
$EMUGEN
-i
$DECODER_TOP_DIR
/renderControl_dec
-E
$ENCODER_TOP_DIR
/renderControl_enc renderControl
rm
$DECODER_TOP_DIR
/GLESv1_dec/gl.attrib
rm
$DECODER_TOP_DIR
/GLESv1_dec/gl.in
rm
$DECODER_TOP_DIR
/GLESv1_dec/gl.types
rm
$DECODER_TOP_DIR
/GLESv2_dec/gl2.attrib
rm
$DECODER_TOP_DIR
/GLESv2_dec/gl2.in
rm
$DECODER_TOP_DIR
/GLESv2_dec/gl2.types
echo
"Done, see
$ENCODER_TOP_DIR
"
exit
0
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录