{"id":398,"date":"2022-05-05T06:37:15","date_gmt":"2022-05-05T04:37:15","guid":{"rendered":"https:\/\/threedots.ovh\/blog\/?p=398"},"modified":"2022-10-12T23:52:35","modified_gmt":"2022-10-12T21:52:35","slug":"zhaoxins-gpu-drivers-for-windows","status":"publish","type":"post","link":"https:\/\/threedots.ovh\/blog\/2022\/05\/zhaoxins-gpu-drivers-for-windows\/","title":{"rendered":"ZhaoXin&#8217;s GPU drivers for Windows"},"content":{"rendered":"\n<p>ZhaoXin is a company selling x86 SoCs in the Chinese market. Let&#8217;s see for a bit what their GPU drivers look like.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where does the GPU IP come from?<\/h2>\n\n\n\n<p>The GPU IP comes from S3 Graphics.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where to get the drivers?<\/h2>\n\n\n\n<p>They&#8217;re available on the <a href=\"https:\/\/www.catalog.update.microsoft.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Windows Update catalog<\/a>, you can use the <em>ZhaoXin<\/em> keyword to search for them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What APIs do they implement?<\/h2>\n\n\n\n<p>D3D9(Ex), D3D11 and OpenCL are the supported APIs.<\/p>\n\n\n\n<p>The OpenGL implementation shipped is <em>really<\/em> odd, but despite that still installed as an OpenGL ICD for Windows (!):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ strings ZXELDMICD_64.dll | grep OpenGL\nOpenGL ES-CM 1.1\nOpenGL ES 2.0 37.00.29\n&#91;...]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">What external codebases do they use?<\/h2>\n\n\n\n<p>This is where things get really fun. Upstream GCC doesn&#8217;t support GLSL or OpenCL C as input languages&#8230; but this does use just that!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">OpenCL<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Configuration settings<\/h4>\n\n\n\n<p> <code>..\/..\/OpenCLCC\/configure --prefix=\/home\/JenniferWu\/gcc_debug --enable-universal --without-stdlib --exec-prefix=\/home\/JenniferWu\/gcc_debug --disable-bootstrap --target=s3exc-pc-mingw32 --program-prefix= --enable-languages=c,opencl --disable-nls --disable-werror --enable-sjlj-exceptions --disable-symvers --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-cxx-flags='-fno-function-sections -fno-data-sections' --enable-fully-dynamic-string --disable-libssp<\/code><\/p>\n\n\n\n<p>The target triplet used is <code>s3exc-pc-mingw32<\/code>. Pretty intriguing choice.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Having a guess at which GCC version it is&#8230;<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>$ strings  zxexgcc.exe | grep gcc-\n--print-libgcc-file-name\n-print-libgcc-file-name\n-gcc-\n  -print-libgcc-file-name  Display the name of the compiler's companion library\n-frecord-gcc-switches\n..\/..\/gcc-3.4.5\/gcc\/config\/i386\/w32-shared-ptr.c<\/code><\/pre>\n\n\n\n<p>This might be based on a GCC 3.4.5 code base, but there&#8217;s no way to be certain on that one.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">OpenGL<\/h2>\n\n\n\n<p><em>No configuration information was kept for this one&#8230;<\/em><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Trying to guess which GCC version it is&#8230;<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>$ strings ZXGLSL_64.dll | grep GCC\n.GCC.command.line\nGCC supports only %u nested scopes\ntype of bit-field %qs is a GCC extension\n%&lt;long long long%&gt; is too long for GCC\n#pragma GCC optimize is not allowed inside functions\n%&lt;#pragma GCC optimize%&gt; is not a string or number\n%&lt;#pragma GCC optimize (string &#91;,string]...)%&gt; does not have a final %&lt;)%&gt;.\n#pragma GCC optimize string... is badly formed\nOffset of packed bit-field %qD has changed in GCC 4.4\n#pragma GCC target is not supported for this machine\n#%s is a GCC extension\n#%s is a deprecated GCC extension\nstyle of line directive is a GCC extension\nfixed-point constants are a GCC extension\ndecimal float constants are a GCC extension\nimaginary constants are a GCC extension\nbinary constants are a GCC extension\nassertions are a GCC extension<\/code><\/pre>\n\n\n\n<p>This would place it as at least GCC 4.5, which does seem to be a quite different GCC codebase from the one used beforehand.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">But which GLSL parser does it use?<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">List of filenames<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>fe\\config\\crx\\crx.c\nfe\\sl_Alias.c\nfe\\sl_Builtin.c\nfe\\sl_Calls.c\nfe\\sl_Dojump.c\nfe\\sl_Dump_rtl.c\nfe\\sl_Emit_rtl.c\nfe\\sl_Expand.c\nfe\\sl_Explow.c\nfe\\sl_Expmed.c\nfe\\sl_Expr.c\nfe\\sl_Fe_common.c\nfe\\sl_Fold_const.c\nfe\\sl_Function.c\nfe\\sl_Ggc_common.c\nfe\\sl_Ggc_page.c\nfe\\sl_Gimple.c\nfe\\sl_Gimple_low.c\nfe\\sl_Glsl_common.c\nfe\\sl_Glsl_decl.c\nfe\\sl_Glsl_function_name.c\nfe\\sl_Glsl_gimplify.c\nfe\\sl_Glsl_lex.c\nfe\\sl_Glsl_pragma.c\nfe\\sl_Glsl_pretty_print.c\nfe\\sl_Glsl_sematics.c\nfe\\sl_Glsl_Typeck.c\nfe\\sl_Graph.c\nfe\\sl_Graphunit.c\nfe\\sl_Insn_emit.c\nfe\\sl_Jump.c\nfe\\sl_Langhooks.c\nfe\\sl_Lists.c\nfe\\sl_Optabs.c\nfe\\sl_Options.c\nfe\\sl_Parser.c\nfe\\sl_Pretty_print.c\nfe\\sl_Print_rtl.c\nfe\\sl_Print_tree.c\nfe\\sl_Real.c\nfe\\sl_Reload.c\nfe\\sl_Rtl.c\nfe\\sl_Rtlanal.c\nfe\\sl_Rtlhooks.c\nfe\\sl_Simplify_rtx.c\nfe\\sl_Stmt.c\nfe\\sl_Stor_layout.c\nfe\\sl_Targhooks.c\nfe\\sl_Tree.c\nfe\\sl_Tree_expand.c\nfe\\sl_Tree_iterator.c\nfe\\sl_Varasm.c\nfe\\sl_Varpool.c\nfe\\sl_Vec.c\ninterface\\GLSLInterfaceImpl.c\ninterface\\MS_Encode.c\ninterface\\OGL_Interface.c\nd:\\p4_code\\sw2666\\sw\\s3gdrv\\source_x86\\glslcompiler\\glslang\\fe\\sl_Tree.h<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">What could it be?<\/h5>\n\n\n\n<p>It doesn&#8217;t seem to match a glslang version that I know about.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Any other particularities to note?<\/h2>\n\n\n\n<p>The OpenCL C compiler is spawned as a subprocess, instead of the compilation being done within the same address space. This is relatively unexpected.<\/p>\n\n\n\n<p>The help information for the assembler:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> S3 Graphics Assembler Tool v0.0\n (note: It distinguishes between uppercase and lowercase)\n S3ASM Command Format:     S3ASM.exe -A target &#91;-FP] -o out_name in_name\n -A                        translate txt file into bin file \n -CL                       OpenCL S3ASM \n target                    target machine: -E2UMA\n -FP                       FPmode in Elite series\n -o\/-O out_name in_name    output file name and input file name\n S3ASM Command Example:    S3ASM.exe -A -E2UMA -o target.bin targetsource.s\n Disambler Command Format: S3ASM.exe -D target -I in_name -O out_name &#91;-SPC startAddress] &#91;-CTX dumpINSContext] &#91;-APD]\n -D                        translate bin file into txt file \n -I in_name                input file name\n -o\/-O out_name            output file name\n -SPC startAddress         start pc value\n -CTX dumpINSContext       context value\n -APD                      file open mode: append\n Disambler Command Example:S3ASM.exe -D -E2UMA -I target.bin -O targetsource.txt<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Where is the source code?<\/h2>\n\n\n\n<p>It doesn&#8217;t seem to be present anywhere.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ZhaoXin is a company selling x86 SoCs in the Chinese market. Let&#8217;s see for a bit what their GPU drivers look like. Where does the GPU IP come from? The GPU IP comes from S3 Graphics. Where to get the drivers? They&#8217;re available on the Windows Update catalog, you can use the ZhaoXin keyword to&hellip;&nbsp;<a href=\"https:\/\/threedots.ovh\/blog\/2022\/05\/zhaoxins-gpu-drivers-for-windows\/\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">ZhaoXin&#8217;s GPU drivers for Windows<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-398","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/threedots.ovh\/blog\/wp-json\/wp\/v2\/posts\/398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/threedots.ovh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/threedots.ovh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/threedots.ovh\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/threedots.ovh\/blog\/wp-json\/wp\/v2\/comments?post=398"}],"version-history":[{"count":3,"href":"https:\/\/threedots.ovh\/blog\/wp-json\/wp\/v2\/posts\/398\/revisions"}],"predecessor-version":[{"id":492,"href":"https:\/\/threedots.ovh\/blog\/wp-json\/wp\/v2\/posts\/398\/revisions\/492"}],"wp:attachment":[{"href":"https:\/\/threedots.ovh\/blog\/wp-json\/wp\/v2\/media?parent=398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/threedots.ovh\/blog\/wp-json\/wp\/v2\/categories?post=398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/threedots.ovh\/blog\/wp-json\/wp\/v2\/tags?post=398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}