Unlock instant, AI-driven research and patent intelligence for your innovation.

Colored language translation method

A language and language information technology, applied in the field of data processing, can solve problems such as poor code readability, unfavorable optimization and debugging, and achieve the effect of improving scalability and readability

Active Publication Date: 2020-08-04
BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
View PDF6 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the code translated by the disassembly operation has the defect of poor readability, which is not conducive to optimization and debugging on the target platform

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Colored language translation method
  • Colored language translation method
  • Colored language translation method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment approach D

[0063] Embodiment D: Optionally, if the second node in the subtree uses the first global resource, write the information of the first global resource into the information of the first function; the first global resource includes texture At least one of resources, buffer resources, and sampler resources.

[0064] Continuing with the above HLSL example, you can continue to analyze the subtree with FNode_B_C as the root node, and when it is found that a node in the subtree uses a certain global resource, record the information of this global resource into the information of function F0 . Among them, if the function F0 uses multiple global resources, such as Buffer, Texture and sampler resources, the Buffer, Texture and sampler resources can be recorded separately.

Embodiment approach E

[0065] Embodiment E: Optionally, if the third node in the subtree uses the first global parameter passing variable, write the information of the first global parameter passing variable into the information of the first function.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides a coloring language translation method. According to the coloring language translation method, an abstract syntax tree of a code file of an original coloring language is obtained, keywords of nodes in the abstract syntax tree are analyzed, and coloring language information contained in the code file of the original coloring language can be obtained. In combination with a set information mapping rule, the coloring language information is translated to obtain a code file of another coloring language. In the process, node analysis is carried out based on the abstract syntax tree, and an original syntax structure of a code file of an original coloring language is reserved. Meanwhile, analysis is carried out based on keywords of the nodes, correspondingtranslation among different types of information is achieved, and readability of translation results is improved; in addition, the information mapping rule can be updated according to actual requirements, the expansibility of the language translation method is improved, and new coloring language grammars are conveniently and quickly supported.

Description

technical field [0001] The present application relates to the technical field of data processing, in particular to a coloring language translation method. Background technique [0002] Shading Language (Shading Language) is a kind of shading language specially used for programming shaders. Currently, a high-level shader language (High Level Shader Language, HLSL) developed and owned by Microsoft is more popular in the industry. However, HLSL can only work on the Windows (an operating system developed by Microsoft) platform, which leads to the problem of limited use of target platforms running other operating systems. [0003] In the prior art, there is a way of translating HLSL codes into codes usable by a target platform through a disassembly operation. However, the code translated by the disassembly operation has the disadvantage of poor readability, which is not conducive to optimization and debugging on the target platform. Therefore, a new solution remains to be prop...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41G06T15/00
CPCG06F8/42G06T15/005
Inventor 孙思远
Owner BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD