Preprocessing method and device of to-be-compiled codes

A preprocessing and code technology, applied in the field of compilation preprocessing, can solve the problems of occupying terminals, large data packets, large memory, etc., and achieve the effect of reducing the number, reducing the terminal memory, and reducing the size

Inactive Publication Date: 2017-02-22
NETEASE (HANGZHOU) NETWORK CO LTD
View PDF4 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0011] In the prior art, the Shader variants that are not used are generally deleted by deleting the Keyword. Specifically, Unity supports the use of the #pragma shader_feature statement in the Shader to delete keywords, but this statement is in conjunction with # When the pragma multi_compile statement is used together, only ...

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
  • Preprocessing method and device of to-be-compiled codes
  • Preprocessing method and device of to-be-compiled codes
  • Preprocessing method and device of to-be-compiled codes

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0040]The principle and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are given only to enable those skilled in the art to better understand and implement the present invention, rather than to limit the scope of the present invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0041] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, device, method or computer program product. Therefore, the present disclosure may be embodied in the form of complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0042] According to an embodiment of the present invention, a method and device for preproc...

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 preprocessing method and device of to-be-compiled codes. The method comprises the steps that in the to-be-compiled codes, whether an instruction for rendering a target object is included in the codes for drawing the target object or not is determined; making response to the instruction for rendering the target object, branch structure statements meeting the preset condition in the instruction are replaced with sequential structure statements; the branch structure statements are used for selecting whether rendering is carried out or not, and the sequential structure statements are used for rendering. The branch structure statements meeting the preset condition in the instruction are replaced with the sequential structure statements, the number of Shader variants generated in the compiling process is reduced, therefore, the size of a data package generated after compiling is reduced, and terminal internal storage occupied during operating is reduced. In addition, the embodiment of the invention provides a preprocessing device of the to-be-compiled codes.

Description

technical field [0001] Embodiments of the present invention relate to the technical field of compiling preprocessing, and more specifically, embodiments of the present invention relate to a method and device for preprocessing code to be compiled. Background technique [0002] This section is intended to provide a background or context for implementations of the invention that are recited in the claims. The descriptions herein are not admitted to be prior art by inclusion in this section. [0003] In the Unity game development engine, a shader (Shader) refers to a set of instructions used by computer graphics resources when performing rendering tasks, and is mainly used to calculate the color or shade of an image. [0004] When writing the code of the Shader instruction, you can use the #pragma multi_compile statement to macro-define the keyword, that is, you can use the #pragma multi_compile statement to identify the symbol immediately following it as a keyword (Keyword), a...

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
IPC IPC(8): G06F9/45
CPCG06F8/441G06F8/443
Inventor 盛凯
Owner NETEASE (HANGZHOU) NETWORK CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products