diff options
Diffstat (limited to 'en/devices/graphics')
-rw-r--r-- | en/devices/graphics/arch-gameloops.html | 4 | ||||
-rw-r--r-- | en/devices/graphics/automate-tests.html | 19 | ||||
-rw-r--r-- | en/devices/graphics/build-tests.html | 43 | ||||
-rw-r--r-- | en/devices/graphics/cts-integration.html | 8 | ||||
-rw-r--r-- | en/devices/graphics/implement-hwc.html | 4 | ||||
-rw-r--r-- | en/devices/graphics/implement-vsync.html | 8 | ||||
-rw-r--r-- | en/devices/graphics/implement-vulkan.html | 18 | ||||
-rw-r--r-- | en/devices/graphics/run-tests.html | 35 | ||||
-rw-r--r-- | en/devices/graphics/test-groups.html | 6 |
9 files changed, 73 insertions, 72 deletions
diff --git a/en/devices/graphics/arch-gameloops.html b/en/devices/graphics/arch-gameloops.html index 574c5a0c..272a779d 100644 --- a/en/devices/graphics/arch-gameloops.html +++ b/en/devices/graphics/arch-gameloops.html @@ -25,7 +25,7 @@ <p>A very popular way to implement a game loop looks like this:</p> -<pre> +<pre class="devsite-click-to-copy"> while (playing) { advance state by one frame render the new frame @@ -130,7 +130,7 @@ game state can be updated quickly.</p> simple game that did nothing but move a block every 100ms, you could have a dedicated thread that just did this:</p> -<pre> +<pre class="devsite-click-to-copy"> run() { Thread.sleep(100); synchronized (mLock) { diff --git a/en/devices/graphics/automate-tests.html b/en/devices/graphics/automate-tests.html index 1cfdf25d..beee449f 100644 --- a/en/devices/graphics/automate-tests.html +++ b/en/devices/graphics/automate-tests.html @@ -22,9 +22,6 @@ --> - -<h2 id=intro>Introduction</h2> - <p>Deqp test modules can be integrated to automated test systems in multiple ways. The best approach depends on the existing test infrastructure and target environment.</p> @@ -67,9 +64,9 @@ The following examples demonstrate how to use the command line Test Executor <h4 id=example_1_run_gles2_functional_tests>Example 1: Run GLES2 functional tests on an Android device:</h4> -<pre> +<pre class="devsite-terminal devsite-click-to-copy"> executor --connect=127.0.0.1 --port=50016 --binaryname= -com.drawelements.deqp/android.app.NativeActivity +com.drawelements.deqp/android.app.NativeActivity --caselistdir=caselists --testset=dEQP-GLES2.* --out=BatchResult.qpa --cmdline="--deqp-crashhandler=enable --deqp-watchdog=enable @@ -78,9 +75,9 @@ com.drawelements.deqp/android.app.NativeActivity <h4 id=example_2_continue_a_partial_opengl>Example 2: Continue a partial OpenGL ES 2 test run locally:</h4> -<pre> +<pre class="devsite-terminal devsite-click-to-copy"> executor --start-server=execserver/execserver --port=50016 ---binaryname=deqp-gles2 --workdir=modules/opengl +--binaryname=deqp-gles2 --workdir=modules/opengl --caselistdir=caselists --testset=dEQP-GLES2.* --exclude=dEQP-GLES2.performance.* --in=BatchResult.qpa --out=BatchResult.qpa @@ -99,14 +96,14 @@ plain-text format can be selected using the following command line argument: <co <h4 id=example_1_export_test_log_in_csv_format>Example 1: Export test log in CSV format</h4> -<pre> -testlog-to-csv --value=code BatchResult.qpa > Result_statuscodes.csv -testlog-to-csv --value=details BatchResult.qpa > Result_statusdetails.csv +<pre class="devsite-click-to-copy"> +<code class="devsite-terminal">testlog-to-csv --value=code BatchResult.qpa > Result_statuscodes.csv</code> +<code class="devsite-terminal">testlog-to-csv --value=details BatchResult.qpa > Result_statusdetails.csv</code> </pre> <h4 id=example_2_list_differences>Example 2: List differences of test results between two test logs</h4> -<pre> +<pre class="devsite-terminal devsite-click-to-copy"> testlog-to-csv --mode=diff --format=text Device_v1.qpa Device_v2.qpa </pre> diff --git a/en/devices/graphics/build-tests.html b/en/devices/graphics/build-tests.html index 3e280ab0..6b5049ea 100644 --- a/en/devices/graphics/build-tests.html +++ b/en/devices/graphics/build-tests.html @@ -35,15 +35,14 @@ compiling the test programs.</p> <p>CMake is an open source build system that supports multiple platforms and toolchains. CMake generates native makefiles or IDE project files from -target-independent configuration files. For more information on CMake, -please see the <a href="http://www.cmake.org/cmake/help/documentation.html">CMake</a> documentation.</p> +target-independent configuration files. For more information on CMake, please see the <a href="http://www.cmake.org/cmake/help/documentation.html">CMake</a> documentation.</p> <p>CMake supports and recommends out-of-source-tree builds, i.e., you should always create makefiles or project files in a separate build directory outside the source tree. CMake does not have any kind of "distclean" target, so removing any files generated by CMake must be done manually.</p> -<p>Configuration options are given to CMake using <code>-D<OPTION_NAME>=<VALUE></code> syntax. Some commonly used options for deqp are listed below.</p> +<p>Configuration options are given to CMake using <code>-D<var>OPTION_NAME</var>=<var>VALUE</var></code> syntax. Some commonly used options for deqp are listed below.</p> <table> <tr> @@ -53,9 +52,9 @@ removing any files generated by CMake must be done manually.</p> <tr> <td><code>DEQP_TARGET</code></td> -<td><p>Target name, for example: "android"</p> +<td><p>Target name, for example: "android"</p> <p>The deqp CMake scripts will include the file -<code>targets/<DEQP_TARGET>/<DEQP_TARGET>.cmake</code> and expect to find target-specific build options from there.</p> +<code>targets/<var>DEQP_TARGET</var>/<var>DEQP_TARGET</var>.cmake</code> and expect to find target-specific build options from there.</p> </td> </tr> <tr> @@ -64,7 +63,7 @@ removing any files generated by CMake must be done manually.</p> </tr> <tr> <td><code>CMAKE_BUILD_TYPE</code></td> -<td><p>Build type for makefile targets. Valid values are: "Debug" and "Release"</p> +<td><p>Build type for makefile targets. Valid values are: "Debug" and "Release"</p> <p>Note the interpretation and default type depend on the targeted build system. See the CMake documentation for details.</p> </td> @@ -75,9 +74,9 @@ See the CMake documentation for details.</p> <p>The deqp build system is configured for new targets using target build files. A target build file defines which features the platform supports and what libraries or -additional include paths are required. Target file names follow the <code>targets/<name>/<name>.cmake</code> format and the target is selected using the <code>DEQP_TARGET</code> build parameter.</p> +additional include paths are required. Target file names follow the <code>targets/<var>NAME</var>/<var>NAME</var>.cmake</code> format and the target is selected using the <code>DEQP_TARGET</code> build parameter.</p> -<p>File paths in target files are relative to the base <code>deqp</code> directory, not the <code>targets/<name></code> directory. The following standard variables can be set by target build file.</p> +<p>File paths in target files are relative to the base <code>deqp</code> directory, not the <code>targets/<var>NAME</var></code> directory. The following standard variables can be set by target build file.</p> <table> <tr> @@ -173,14 +172,14 @@ compiler. The deqp has been tested with Visual Studio 2013.</p> <p>Visual Studio project files can be generated with the following command:</p> -<pre> +<pre class="devsite-terminal devsite-click-to-copy"> cmake path\to\src\deqp -G "Visual Studio 12" </pre> -<p>A 64-bit build can be made by selecting "Visual Studio <ver> Win64" as the build +<p>A 64-bit build can be made by selecting "Visual Studio <var>VERSION</var> Win64" as the build generator:</p> -<pre> +<pre class="devsite-terminal devsite-click-to-copy"> cmake path\to\src\deqp -G "Visual Studio 12 Win64" </pre> @@ -223,7 +222,7 @@ Build-tools <a href="http://developer.android.com/sdk/index.html#Other">packages <li><a href="https://www.python.org/downloads/">Python 2.6</a> or newer in 2.x series; Python 3.x is not supported <li>For Windows: Either NMake or JOM in <code>PATH</code> <ul> - <li><a href="http://qt-project.org/wiki/jom">JOM</a> enables faster builds + <li><a href="http://qt-project.org/wiki/jom">JOM</a> enables faster builds </ul> <li> Optional: Ninja make is also supported on Linux </ul> @@ -231,7 +230,7 @@ Build-tools <a href="http://developer.android.com/sdk/index.html#Other">packages <p>Ant and SDK binaries are located based on the PATH environment variable with certain overriding defaults. The logic is controlled by <code>android/scripts/common.py</code>. </p> -<p>The NDK directory must be either <code>~/android-ndk-<version></code> or <code>C:/android/android-ndk-<version></code> or defined via the <code>ANDROID_NDK_PATH</code> environment variable.</p> +<p>The NDK directory must be either <code>~/android-ndk-<var>VERSION</var></code> or <code>C:/android/android-ndk-<var>VERSION</var></code> or defined via the <code>ANDROID_NDK_PATH</code> environment variable.</p> <p>Deqp on-device components, the test execution service, and test programs are built by executing the <code>android/scripts/build.py</code> script. The final .apk is created in <code>android/package/bin</code> and can be installed by the <code>install.py</code> script. If the <a href="port-tests.html#test_execution_service">command line executor</a> is used, the ExecService is launched with <code>launch.py</code> script on the device via ADB. The scripts can be executed from any directory.</p> @@ -283,12 +282,12 @@ x11_egl_glx</code></td> <p>An example of a full command line used to do a 32-bit debug build against driver headers and libraries in a custom location is the following:</p> -<pre> -$ cmake <path to src>/deqp -DDEQP_TARGET=x11_egl -DCMAKE_C_FLAGS="-m32" +<pre class="devsite-click-to-copy"> +<code class="devsite-terminal">cmake <path to src>/deqp -DDEQP_TARGET=x11_egl -DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32" -DCMAKE_BUILD_TYPE=Debug --DCMAKE_LIBRARY_PATH="<path to driver>/lib" --DCMAKE_INCLUDE_PATH="<path to driver>/inc" -$ make -j4 +-DCMAKE_LIBRARY_PATH="<var>PATH_TO_DRIVER</var>/lib" +-DCMAKE_INCLUDE_PATH="<var>PATH_TO_DRIVER</var>/inc"</code> +<code class="devsite-terminal">make -j4</code> </pre> <h2 id=cross-compiling>Cross-compiling</h2> @@ -334,10 +333,10 @@ DE_PTR_SIZE</code></td> <p>The toolchain file can be selected using the <code>CMAKE_TOOLCHAIN_FILE</code> build parameter. For example, the following would create makefiles for a build using the CodeSourcery cross-compiler for ARM/Linux:</p> -<pre> -cmake <path to src>/deqp –DDEQP_BUILD_TYPE="Release" -–DCMAKE_TOOLCHAIN_FILE=<path to src>/delibs/cmake/toolchain-arm-cs.cmake -–DARM_CC_BASE=<path to cc directory> +<pre class="devsite-terminal devsite-click-to-copy"> +cmake <var>PATH_TO_SRC</var>/deqp –DDEQP_BUILD_TYPE="Release" +–DCMAKE_TOOLCHAIN_FILE=<var>PATH_TO_SRC</var>/delibs/cmake/toolchain-arm-cs.cmake +–DARM_CC_BASE=<var>PATH_TO_CC_DIRECTORY</var> </pre> <h2 id=run-time_linking_of_gles_and_egl_libraries>Run-time linking of GLES and EGL libraries</h2> diff --git a/en/devices/graphics/cts-integration.html b/en/devices/graphics/cts-integration.html index 89169ee9..cf105b19 100644 --- a/en/devices/graphics/cts-integration.html +++ b/en/devices/graphics/cts-integration.html @@ -35,8 +35,8 @@ files can be found under the <code>android/cts</code> directory in the deqp source tree. You can run deqp tests through the <code>cts-tradefed</code> utility with the following command:</p> -<pre> -$ cts-tradefed run cts --plan CTS-DEQP +<pre class="devsite-terminal devsite-click-to-copy"> +cts-tradefed run cts --plan CTS-DEQP </pre> <h2 id=duplicating_runs_without_cts>Duplicating runs without CTS</h2> @@ -44,8 +44,8 @@ $ cts-tradefed run cts --plan CTS-DEQP <p>To replicate the CTS run, install the deqp APK of the CTS package and use the following command:</p> -<pre> -$ adb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity -e \ +<pre class="devsite-terminal devsite-click-to-copy"> +adb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity -e \ cmdLine "deqp --deqp-case=dEQP-GLES3.some_group.* --deqp-gl-config-name=rgba8888d24s8 --deqp-log-filename=/sdcard/dEQP-Log.qpa </pre> diff --git a/en/devices/graphics/implement-hwc.html b/en/devices/graphics/implement-hwc.html index 76c58f55..903d335e 100644 --- a/en/devices/graphics/implement-hwc.html +++ b/en/devices/graphics/implement-hwc.html @@ -206,7 +206,7 @@ composition. SurfaceFlinger may choose to:</p> <li>Change some of the layer composition types and re-validate the display.</li> </ul> -<blockquote><strong><em>OR</strong></em></blockquote> +<em><strong>OR</strong></em> <ul> <li>Call <code>acceptDisplayChanges</code>, which has the same effect as @@ -252,7 +252,7 @@ they are currently performed sequentially for all active displays, even if only the contents of one display are updated.</p> <p>For example, if only the external display is updated, the sequence is:</p> -<pre> +<pre class="devsite-click-to-copy"> // Update state for internal display // Update state for external display validateDisplay(<internal display>) diff --git a/en/devices/graphics/implement-vsync.html b/en/devices/graphics/implement-vsync.html index 9fa1252b..828d8d1c 100644 --- a/en/devices/graphics/implement-vsync.html +++ b/en/devices/graphics/implement-vsync.html @@ -32,7 +32,9 @@ visual performance of graphics.</p> <p>The Hardware Composer (HWC) has a function pointer indicating the function to implement for VSYNC:</p> -<pre class=prettyprint> int (waitForVsync*) (int64_t *timestamp) </pre> +<pre class="prettyprint"> +int (waitForVsync*) (int64_t *timestamp) +</pre> <p>This function blocks until a VSYNC occurs and returns the timestamp of the actual VSYNC. A message must be sent every time VSYNC occurs. A client can @@ -179,7 +181,7 @@ synchronization framework existed, this function would receive dma-bufs, put those buffers on the display, and block while the buffer is visible. For example:</p> -<pre class=prettyprint> +<pre class="prettyprint"> /* * assumes buf is ready to be displayed. returns when buffer is no longer on * screen. @@ -197,7 +199,7 @@ own fence, which is a guarantee of when the buffer will be off of the display. As you queue up buffers, the kernel will list dependencies with the synchronization framework:</p> -<pre class=prettyprint> +<pre class="prettyprint"> /* * will display buf when fence is signaled. returns immediately with a fence * that will signal when buf is no longer displayed. diff --git a/en/devices/graphics/implement-vulkan.html b/en/devices/graphics/implement-vulkan.html index ca5c1a08..918343e1 100644 --- a/en/devices/graphics/implement-vulkan.html +++ b/en/devices/graphics/implement-vulkan.html @@ -81,7 +81,7 @@ for discovering and loading the driver. Preferred paths for 32-bit and 64-bit Vulkan drivers are:</p> <p> -<pre> +<pre class="devsite-click-to-copy"> /vendor/lib/hw/vulkan.<ro.product.platform>.so /vendor/lib64/hw/vulkan.<ro.product.platform>.so </pre> @@ -176,7 +176,7 @@ the platform asks the driver to translate the requested format and image usage flags into gralloc usage flags by calling:</p> <p> -<pre> +<pre class="devsite-click-to-copy"> VkResult VKAPI vkGetSwapchainGrallocUsageANDROID( VkDevice device, VkFormat format, @@ -203,7 +203,7 @@ VK_SWAP_CHAIN_INFO_TYPE_IMAGES_WSI ..)</code>. The WSI implementation allocates the number of native buffers requested for the swapchain, then creates a <code>VkImage</code> for each one:</p> -<p><pre> +<pre class="devsite-click-to-copy"> typedef struct { VkStructureType sType; // must be VK_STRUCTURE_TYPE_NATIVE_BUFFER_ANDROID const void* pNext; @@ -216,12 +216,12 @@ typedef struct { int format; int usage; } VkNativeBufferANDROID; -</pre></p> +</pre> <p>When creating a gralloc-backed image, the <code>VkImageCreateInfo</code> has the following data:</p> -<p><pre> +<pre class="devsite-click-to-copy"> .imageType = VK_IMAGE_TYPE_2D .format = a VkFormat matching the format requested for the gralloc buffer .extent = the 2D dimensions requested for the gralloc buffer @@ -241,7 +241,7 @@ the following data:</p> and imports an externally-signalled native fence into both an existing <code>VkSemaphore</code> object and an existing <code>VkFence</code> object:</p> -<p><pre> +<pre class="devsite-click-to-copy"> VkResult VKAPI vkAcquireImageANDROID( VkDevice device, VkImage image, @@ -249,7 +249,7 @@ VkResult VKAPI vkAcquireImageANDROID( VkSemaphore semaphore, VkFence fence ); -</pre></p> +</pre> <p>This function is called during <code>vkAcquireNextImageWSI</code> to import a native fence into the <code>VkSemaphore</code> and <code>VkFence</code> objects @@ -274,13 +274,13 @@ it is as if the native fence was already signalled.</p> external use, and creates a native fence and schedules it to be signalled when prior work on the queue has completed:</p> -<p><pre> +<pre class="devsite-click-to-copy"> VkResult VKAPI vkQueueSignalReleaseImageANDROID( VkQueue queue, VkImage image, int* pNativeFenceFd ); -</pre></p> +</pre> <p>This API is called during <code>vkQueuePresentWSI</code> on the provided queue. Effects are similar to <code>vkQueueSignalSemaphore</code>, except with a diff --git a/en/devices/graphics/run-tests.html b/en/devices/graphics/run-tests.html index f7846a61..b0d043b2 100644 --- a/en/devices/graphics/run-tests.html +++ b/en/devices/graphics/run-tests.html @@ -209,19 +209,19 @@ the full name of each test on a separate line in a standard ASCII file. As the test sets grow, the repetitive prefixes can be cumbersome. To avoid repeating the prefixes, use a trie (also known as a prefix tree) syntax shown below.</p> -<pre> +<pre class="devsite-click-to-copy"> {nodeName{firstChild{…},…lastChild{…}}} </pre> <p>For example:</p> -<pre> +<pre class="devsite-click-to-copy"> {dEQP-EGL{config-list,create_context{rgb565_depth_stencil}}} </pre> <p>Translates into the following two test cases:</p> -<pre> +<pre class="devsite-click-to-copy"> dEQP-EGL.config_list dEQP-EGL.create_context.rgb565_depth_stencil </pre> @@ -235,20 +235,22 @@ a <code>NativeActivity</code> that uses EGL (requires Android 3.2 or higher).</p <p>The application package can be installed with the following command (name shown is the name of the APK in the Android CTS package; which name depends on the build):</p> -<pre>$ adb –d install –r com.drawelements.deqp.apk</pre> +<pre class="devsite-terminal devsite-click-to-copy"> +adb –d install –r com.drawelements.deqp.apk +</pre> <p>To launch the test execution service and to setup port forwarding, use the following:</p> -<pre> -$ adb –d forward tcp:50016 tcp:50016 -$ adb –d shell am start –n com.drawelements.deqp/.execserver.ServiceStarter +<pre class="devsite-click-to-copy"> +<code class="devsite-terminal">adb –d forward tcp:50016 tcp:50016</code> +<code class="devsite-terminal">adb –d shell am start –n com.drawelements.deqp/.execserver.ServiceStarter</code> </pre> <p>Debug prints can be enabled by executing the following before starting the tests:</p> -<pre> -$ adb –d shell setprop log.tag.dEQP DEBUG +<pre class="devsite-terminal devsite-click-to-copy"> +adb –d shell setprop log.tag.dEQP DEBUG </pre> <h3 id=executing_tests_on_android_without_android_cts>Executing tests on @@ -267,7 +269,8 @@ log.</p> utility. For example, to run <code>dEQP-GLES2.info</code> tests on a platform supporting <code>NativeActivity,</code> use the following commands.</p> -<pre>$ adb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity -e \ +<pre class="devsite-terminal devsite-click-to-copy"> +adb -d shell am start -n com.drawelements.deqp/android.app.NativeActivity -e \ cmdLine "deqp --deqp-case=dEQP-GLES2.info.* --deqp-log-filename=/sdcard/dEQP-Log.qpa </pre> @@ -276,15 +279,16 @@ cmdLine "deqp --deqp-case=dEQP-GLES2.info.* --deqp-log-filename=/sdcard/dEQP-Log <p>To run the tests under the GDB debugger on Android, first compile and install the debug build by running the following two scripts:</p> -<pre> -$ python android/scripts/build.py --native-build-type=Debug -$ python android/scripts/install.py +<pre class="devsite-click-to-copy"> +<code class="devsite-terminal">python android/scripts/build.py --native-build-type=Debug</code> +<code class="devsite-terminal">python android/scripts/install.py</code> </pre> <p>After the debug build is installed on the device, to launch the tests under GDB running on the host, run the following command:</p> -<pre>$ python android/scripts/debug.py \ +<pre class="devsite-terminal devsite-click-to-copy"> +python android/scripts/debug.py \ --deqp-commandline="--deqp-log-filename=/sdcard/TestLog.qpa --deqp-case=dEQP-GLES2.functional.*" </pre> @@ -310,8 +314,7 @@ line parameters should be enough.</p> <code><path-to-ndk>/prebuilt/windows/bin</code> to the PATH variable.</p> <p class="note"><strong>Note:</strong> Native code debugging does not work on -stock Android 4.3; for workarounds, refer to -<a href="https://code.google.com/p/android/issues/detail?id=58373">https://code.google.com/p/android/issues/detail?id=58373</a>. +stock Android 4.3; for workarounds, refer to <a href="https://issuetracker.google.com/issues/36976703">this public bug</a>. Android 4.4 and higher do not contain this bug.</p> </body> diff --git a/en/devices/graphics/test-groups.html b/en/devices/graphics/test-groups.html index 943c1140..e39ac440 100644 --- a/en/devices/graphics/test-groups.html +++ b/en/devices/graphics/test-groups.html @@ -35,14 +35,14 @@ allocating certain resources until the driver reports an out-of-memory error.</p can occur: The operating system may kill the test process instead of allowing a driver to handle or otherwise provide an out-of-memory error. On such platforms, tests that are designed to cause out-of-memory errors are disabled -by default, and must be enabled using the <code>--deqp-test-oom=enable</code> command line argument. +by default, and must be enabled using the <code>--deqp-test-oom=enable</code> command line argument. It is recommended that you run such tests manually to check if the system behaves correctly under resource pressure. However, in such a situation, a test process crash should be interpreted as a pass.</p> <h3 id=test_groups>Test groups</h3> -<pre> +<pre class="devsite-click-to-copy"> dEQP-GLES2.stress.memory.* dEQP-GLES3.stress.memory.* </pre> @@ -55,7 +55,7 @@ they can be configured to run indefinitely by supplying the <code>--deqp-test-it <h3 id=test_groups2>Test groups</h3> -<pre> +<pre class="devsite-click-to-copy"> dEQP-GLES2.stress.long.* dEQP-GLES3.stress.long.* </pre> |