Supercharge Your Innovation With Domain-Expert AI Agents!

Shader code debugging method and device, electronic device and storage medium

A debugging method and shader technology, applied in software testing/debugging, instrumentation, electrical digital data processing, etc., can solve problems such as inability to debug shader code and reduce development efficiency

Pending Publication Date: 2019-09-27
BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF5 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] When implementing 3D graphics effects, the code supported by the shader (that is, the shader code) is usually used, and the shader code needs to be written in a string. These codes will be loaded into the GPU (Graphics Processing Unit) during the development process. Execute in , and because the developer does not provide a debugging tool for the shader code in the GPU during the production process, the shader code cannot be directly debugged in the GPU
[0004] Obviously, during the development process, the shader code in the job cannot be debugged, which reduces the development efficiency

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
  • Shader code debugging method and device, electronic device and storage medium
  • Shader code debugging method and device, electronic device and storage medium
  • Shader code debugging method and device, electronic device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0039] figure 1 is a flow chart of a shader code debugging method shown according to an exemplary embodiment, as shown in figure 1 As shown, the shader code debugging method is applied to the first terminal, and may specifically include the following steps:

[0040] In step S11, the received shader code is input into a preset compiler.

[0041] In this embodiment of the present disclosure, the first terminal may be a PC (Personal Computer, personal computer), and the PC may be an electronic device such as a desktop computer or a notebook computer.

[0042] A shader (Shader) refers to an editable program used to implement image rendering to replace a fixed rendering pipeline. Shader can be divided into two types: Vertex Shader (vertex shader) and Pixel Shader (pixel shader). Among them, Vertex Shader is mainly responsible for the calculation of the geometric relationship of vertices, and Pixel Shader is mainly responsible for the calculation of the color of the film source. ...

Embodiment 2

[0150] figure 2 is a flow chart of a shader code debugging method shown according to an exemplary embodiment, as shown in figure 2 As shown, the shader code debugging method is applied to the first terminal, and may specifically include the following steps:

[0151] In step S21, the received shader code is input into a preset compiler.

[0152] In step S22, the compilation result output by the preset compiler is received.

[0153] In step S23, according to the compilation result, it is determined whether there is at least one abnormal code line in the shader code.

[0154] In the embodiment of the present disclosure, the implementation manners of the above steps S21 to S23 are similar to the implementation manners of the steps S11 to S13 in the first embodiment above, and the embodiments of the present disclosure will not describe them one by one here.

[0155] In step S24, if there is the at least one abnormal code line in the shader code, perform conversion processing o...

Embodiment 3

[0180] image 3 is a block diagram of a shader code debugging device shown according to an exemplary embodiment, such as image 3 As shown, the shader code debugging device is applied to the first terminal, and may specifically include the following modules:

[0181] A shader code input module 310, configured to input the received shader code into a preset compiler;

[0182] Compilation result receiving module 320, configured to receive the compilation result output by the preset compiler;

[0183] An abnormal code line determining module 330, configured to determine whether there is at least one abnormal code line in the shader code according to the compilation result;

[0184] A code import module 340, configured to import the shader code and the at least one abnormal code line into a second terminal if the at least one abnormal code line exists in the shader code;

[0185] a rendering and displaying module 350, configured to render and display the shader code and the at ...

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 invention relates to a shader code debugging method and device, an electronic device and a storage medium. The method comprises the following steps of inputting a received shader code into a preset compiler; receiving a compiling result outputted by the preset compiler; according to the compiling result, determining whether the shader code has at least one abnormal code line or not; importing the shader code and the at least one abnormal code line into a second terminal under the condition that the at least one abnormal code line exists in the shader code; rendering and displaying the shader code and the at least one abnormal code line by the second terminal; determining a to-be-debugged code line in the at least one abnormal code line according to a rendering display result; and using the second terminal to debug the shader code according to the to-be-debugged code line. According to the present invention, the processing load of the second terminal can be reduced, the errors or problems in the shader codes can be detected, and the shader codes can be debugged.

Description

technical field [0001] The present disclosure relates to the technical field of shader debugging, and in particular to a shader code debugging method, device, electronic equipment, and storage medium. Background technique [0002] Shader (shader) is a program that can operate on 3D objects and is executed by the GPU. Through these programs, programmers can obtain most of the desired 3D graphics effects. [0003] When implementing 3D graphics effects, the code supported by the shader (that is, the shader code) is usually used, and the shader code needs to be written in a string, and these codes will be loaded into the GPU (Graphics Processing Unit) during the development process. However, since the developer does not provide a debugging tool for the shader code in the GPU during the production process, the shader code cannot be directly debugged in the GPU. [0004] Obviously, during the development process, the shader code in the job cannot be debugged, which reduces the d...

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): G06F11/36
CPCG06F11/3624
Inventor 张一磊
Owner BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More