CN108257075B - Dereferencing and assembling method for vertex array command - Google Patents

Dereferencing and assembling method for vertex array command Download PDF

Info

Publication number
CN108257075B
CN108257075B CN201711280984.3A CN201711280984A CN108257075B CN 108257075 B CN108257075 B CN 108257075B CN 201711280984 A CN201711280984 A CN 201711280984A CN 108257075 B CN108257075 B CN 108257075B
Authority
CN
China
Prior art keywords
vertex
attribute
command
dereferencing
turning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711280984.3A
Other languages
Chinese (zh)
Other versions
CN108257075A (en
Inventor
邓艺
牛少平
郝冲
韩一鹏
魏艳艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Aeronautics Computing Technique Research Institute of AVIC
Original Assignee
Xian Aeronautics Computing Technique Research Institute of AVIC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Aeronautics Computing Technique Research Institute of AVIC filed Critical Xian Aeronautics Computing Technique Research Institute of AVIC
Priority to CN201711280984.3A priority Critical patent/CN108257075B/en
Publication of CN108257075A publication Critical patent/CN108257075A/en
Application granted granted Critical
Publication of CN108257075B publication Critical patent/CN108257075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention belongs to the field of computer graphics, and relates to a method for dereferencing and assembling vertex array commands, which comprises the following steps: step 1, initial state of vertex array assembly; step 2, judging the type of the vertex array command; step 3, dereferencing the single vertex group class; step 4, dereferencing the multi-vertex group class; step 5, obtaining an attribute index address; step 6, calculating the storage address of the effective attribute; step 7, obtaining single-vertex effective attribute data; step 8, supporting the assembly of the attribute array with local disorder; 9, issuing a single-vertex effective attribute drawing command; step 10, completing a single vertex attribute command; step 11, inquiring the number of vertexes carried by the multi-vertex array command; step 12, completing a multi-vertex array command; and step 13, dereferencing and assembling the vertex array.

Description

Dereferencing and assembling method for vertex array command
Technical Field
The invention belongs to the field of computer graphics, and relates to a method for dereferencing and assembling vertex array commands.
Background
In the graphics processor, before the 3D engine receives the vertex group command, the 3D engine needs to perform dereferencing and assembling of the command, assembles the command into an agreed packet header and a format of each component attribute data, and then issues the packet header and the format into the 3D engine to execute a graphics drawing process, so that a simple and efficient vertex group command dereferencing and assembling mechanism has important influence on the graphics drawing efficiency of the graphics processor. The currently disclosed research is mostly directed to the research of the unified stainer kernel and the graphics processing algorithm, and no research on the dereferencing and assembling method of the vertex array command is found.
Disclosure of Invention
The purpose of the invention is:
the invention mainly provides a dereferencing and assembling method of vertex array commands, which is beneficial to reducing the number of graphics application programs, reducing the transmission number of graphics commands of a host and improving the graphics drawing efficiency.
The solution of the invention is:
a method for dereferencing and assembling vertex array commands, comprising:
step 1, monitoring whether effective vertex array class command input is received or not in an initial state of vertex array assembly, and if the input command is effective, turning to step 2;
step 2, judging the type of the vertex array command, judging that the current command needs to draw a single vertex and attribute information thereof or at least two vertexes and attributes according to the input command code, if the current command needs to draw a single vertex and attribute information thereof, turning to step 3, and if the current command does not need to draw a single vertex and attribute information thereof, turning to step 4;
step 3, dereferencing the single-vertex array class, dereferencing the packet head parts of at least two effective attribute drawing commands of a single vertex according to the input configuration information, and turning to step 6 if dereferencing is finished;
step 4, dereferencing the multi-vertex groups, dereferencing the packet head parts of at least two vertexes which have at least two effective attribute drawing commands according to the input configuration information, and turning to step 5 if dereferencing is completed;
step 5, acquiring an attribute index address, acquiring at least two vertex array commands from a defined storage space according to input configuration information, calculating the attribute index address required by each vertex in the vertex array commands, and turning to step 6 if an effective index address is acquired;
step 6, calculating the storage addresses of the effective attributes, calculating the storage address information of each effective attribute acquired from the defined attribute array according to the input configuration information, and turning to step 7 if the calculation is finished;
step 7, acquiring single-vertex effective attribute data, acquiring and caching each effective attribute data according to the storage address of each effective attribute, and then turning to step 8;
step 8, supporting the assembly of the attribute array of the local disorder, assembling the obtained effective attribute data into an agreed packet header and each component attribute data format, in the assembly process, except for representing the attributes of the vertex coordinates, other attributes belonging to the same vertex can be assembled in a disorder manner but are only limited to the local disorder, the order is still maintained among the attributes belonging to different vertices, and the step 9 is switched to after the assembly is finished;
step 9, issuing a single-vertex effective attribute drawing command, counting and identifying attribute data assembly and issuing information of the same vertex, and turning to step 10 when all effective attributes of the same vertex are completely assembled and issued;
step 10, completing the single-vertex attribute command, if the single-vertex attribute command is a single-vertex array type command, turning to step 13, identifying that dereferencing and assembling of the single-vertex array are completed, and if the single-vertex attribute command is a multi-vertex array type command, turning to step 11;
step 11, inquiring the vertex number carried by the multi-vertex array command, inquiring whether the vertex needing to be drawn and the effective attribute thereof carried by the current command are acquired, cached, assembled and issued, if the vertex is not drawn, turning to step 5 to acquire an attribute index address, and if the assembly and the issue of all the current vertices are finished, turning to step 12;
step 12, completing the multi-vertex array command, identifying that the dereferencing and assembling of all vertex arrays carried by the command are completed, and turning to step 13;
and step 13, completing dereferencing and assembling of the vertex array, completing dereferencing and assembling processes of the identification vertex array class command, and turning to step 1.
The invention has the beneficial effects that: the method realizes the dereferencing and assembling of the input vertex group commands, and simultaneously uses the assembling method of local disorder and global sequence, thereby effectively improving the dereferencing and assembling efficiency of the commands, being beneficial to reducing the number of graphic application programs, reducing the transmission number of the graphic commands of the host and improving the graphic drawing efficiency.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, a method for dereferencing and assembling vertex array commands,
step 1, monitoring whether effective vertex array class command input is received or not in an initial state of vertex array assembly, and if the input command is effective, turning to step 2;
step 2, judging the type of the vertex array command, judging that the current command needs to draw a single vertex and attribute information thereof or at least two vertexes and attributes according to the input command code, if the current command needs to draw a single vertex and attribute information thereof, turning to step 3, and if the current command does not need to draw a single vertex and attribute information thereof, turning to step 4;
step 3, dereferencing the single-vertex array class, dereferencing the packet head parts of at least two effective attribute drawing commands of a single vertex according to the input configuration information, and turning to step 6 if dereferencing is finished;
step 4, dereferencing the multi-vertex groups, dereferencing the packet head parts of at least two vertexes which have at least two effective attribute drawing commands according to the input configuration information, and turning to step 5 if dereferencing is completed;
step 5, acquiring an attribute index address, acquiring at least two vertex array commands from a defined storage space according to input configuration information, calculating the attribute index address required by each vertex in the vertex array commands, and turning to step 6 if an effective index address is acquired;
step 6, calculating the storage addresses of the effective attributes, calculating the storage address information of each effective attribute acquired from the defined attribute array according to the input configuration information, and turning to step 7 if the calculation is finished;
step 7, acquiring single-vertex effective attribute data, acquiring and caching each effective attribute data according to the storage address of each effective attribute, and then turning to step 8;
step 8, supporting the assembly of the attribute array of the local disorder, assembling the obtained effective attribute data into an agreed packet header and each component attribute data format, in the assembly process, except for representing the attributes of the vertex coordinates, other attributes belonging to the same vertex can be assembled in a disorder manner but are only limited to the local disorder, the order is still maintained among the attributes belonging to different vertices, and the step 9 is switched to after the assembly is finished;
step 9, issuing a single-vertex effective attribute drawing command, counting and identifying attribute data assembly and issuing information of the same vertex, and turning to step 10 when all effective attributes of the same vertex are completely assembled and issued;
step 10, completing the single-vertex attribute command, if the single-vertex attribute command is a single-vertex array type command, turning to step 13, identifying that dereferencing and assembling of the single-vertex array are completed, and if the single-vertex attribute command is a multi-vertex array type command, turning to step 11;
step 11, inquiring the vertex number carried by the multi-vertex array command, inquiring whether the vertex needing to be drawn and the effective attribute thereof carried by the current command are acquired, cached, assembled and issued, if the vertex is not drawn, turning to step 5 to acquire an attribute index address, and if the assembly and the issue of all the current vertices are finished, turning to step 12;
step 12, completing the multi-vertex array command, identifying that the dereferencing and assembling of all vertex arrays carried by the command are completed, and turning to step 13;
and step 13, completing dereferencing and assembling of the vertex array, completing dereferencing and assembling processes of the identification vertex array class command, and turning to step 1.

Claims (1)

1. A method for dereferencing and assembling vertex array commands,
step 1, monitoring whether effective vertex array class command input is received or not in an initial state of vertex array assembly, and if the input command is effective, turning to step 2;
step 2, judging the type of the vertex array command, judging that the current command needs to draw a single vertex and attribute information thereof or at least two vertexes and attributes according to the input command code, if the current command needs to draw a single vertex and attribute information thereof, turning to step 3, and if the current command does not need to draw a single vertex and attribute information thereof, turning to step 4;
step 3, dereferencing the single-vertex array class, dereferencing the packet head parts of at least two effective attribute drawing commands of a single vertex according to the input configuration information, and turning to step 6 if dereferencing is finished;
step 4, dereferencing the multi-vertex groups, dereferencing the packet head parts of at least two vertexes which have at least two effective attribute drawing commands according to the input configuration information, and turning to step 5 if dereferencing is completed;
step 5, acquiring an attribute index address, acquiring at least two vertex array commands from a defined storage space according to input configuration information, calculating the attribute index address required by each vertex in the vertex array commands, and turning to step 6 if an effective index address is acquired;
step 6, calculating the storage addresses of the effective attributes, calculating the storage address information of each effective attribute acquired from the defined attribute array according to the input configuration information, and turning to step 7 if the calculation is finished;
step 7, acquiring single-vertex effective attribute data, acquiring and caching each effective attribute data according to the storage address of each effective attribute, and then turning to step 8;
step 8, supporting the assembly of the attribute array of the local disorder, assembling the obtained effective attribute data into an agreed packet header and each component attribute data format, in the assembly process, except for representing the attributes of the vertex coordinates, other attributes belonging to the same vertex can be assembled in a disorder manner but are only limited to the local disorder, the order is still maintained among the attributes belonging to different vertices, and the step 9 is switched to after the assembly is finished;
step 9, issuing a single-vertex effective attribute drawing command, counting and identifying attribute data assembly and issuing information of the same vertex, and turning to step 10 when all effective attributes of the same vertex are completely assembled and issued;
step 10, completing the single-vertex attribute command, if the single-vertex attribute command is a single-vertex array type command, turning to step 13, identifying that dereferencing and assembling of the single-vertex array are completed, and if the single-vertex attribute command is a multi-vertex array type command, turning to step 11;
step 11, inquiring the vertex number carried by the multi-vertex array command, inquiring whether the vertex needing to be drawn and the effective attribute thereof carried by the current command are acquired, cached, assembled and issued, if the vertex is not drawn, turning to step 5 to acquire an attribute index address, and if the assembly and the issue of all the current vertices are finished, turning to step 12;
step 12, completing the multi-vertex array command, identifying that the dereferencing and assembling of all vertex arrays carried by the command are completed, and turning to step 13;
and step 13, completing dereferencing and assembling of the vertex array, completing dereferencing and assembling processes of the identification vertex array class command, and turning to step 1.
CN201711280984.3A 2017-12-06 2017-12-06 Dereferencing and assembling method for vertex array command Active CN108257075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711280984.3A CN108257075B (en) 2017-12-06 2017-12-06 Dereferencing and assembling method for vertex array command

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711280984.3A CN108257075B (en) 2017-12-06 2017-12-06 Dereferencing and assembling method for vertex array command

Publications (2)

Publication Number Publication Date
CN108257075A CN108257075A (en) 2018-07-06
CN108257075B true CN108257075B (en) 2021-07-16

Family

ID=62721102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711280984.3A Active CN108257075B (en) 2017-12-06 2017-12-06 Dereferencing and assembling method for vertex array command

Country Status (1)

Country Link
CN (1) CN108257075B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111047503B (en) * 2019-11-21 2023-06-13 中国航空工业集团公司西安航空计算技术研究所 Attribute storage and assembly optimization circuit of vertex array class command

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708537A (en) * 2011-03-03 2012-10-03 Arm有限公司 Graphics processing
CN103279974A (en) * 2013-05-15 2013-09-04 中国科学院软件研究所 High-accuracy high-resolution satellite imaging simulation engine and implementation method
CN103700143A (en) * 2013-12-30 2014-04-02 四川九洲电器集团有限责任公司 Three-dimensional dynamic marine simulation method based on GPU (Graphics Processing Unit) multi-pass drawing
CN105427353A (en) * 2015-11-12 2016-03-23 小米科技有限责任公司 Compression and drawing method and device of scalable vector graphic
CN106651744A (en) * 2016-12-12 2017-05-10 中国航空工业集团公司西安航空计算技术研究所 Low power consumption GPU (Graphic Process Unit) staining task and uniform staining array task field mapping structure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708537A (en) * 2011-03-03 2012-10-03 Arm有限公司 Graphics processing
CN103279974A (en) * 2013-05-15 2013-09-04 中国科学院软件研究所 High-accuracy high-resolution satellite imaging simulation engine and implementation method
CN103700143A (en) * 2013-12-30 2014-04-02 四川九洲电器集团有限责任公司 Three-dimensional dynamic marine simulation method based on GPU (Graphics Processing Unit) multi-pass drawing
CN105427353A (en) * 2015-11-12 2016-03-23 小米科技有限责任公司 Compression and drawing method and device of scalable vector graphic
CN106651744A (en) * 2016-12-12 2017-05-10 中国航空工业集团公司西安航空计算技术研究所 Low power consumption GPU (Graphic Process Unit) staining task and uniform staining array task field mapping structure

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱豪杰等."GPU命令处理器的存储管理单元设计".《西安邮电大学学报》.2013,第18卷(第1期), *

Also Published As

Publication number Publication date
CN108257075A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN113330421B (en) Dot product calculator and operation method thereof
CN103839228B (en) A kind of take out rare method with smoothing processing based on map vector data
US10628398B2 (en) Conservative garbage collecting and tagged integers for memory management
EP3483838A3 (en) Systems and methods for rendering with ray tracing
CN104301442A (en) Method for realizing client of access object storage cluster based on fuse
CN104408190A (en) Spark based data processing method and device
CN109598077A (en) A kind of graphics pipeline device and modeling method based on GPU chip
CN104267940A (en) Quick map tile generation method based on CPU+GPU
CN105574808A (en) Stream line texture mapping unit system structure
CN108257075B (en) Dereferencing and assembling method for vertex array command
CN105957149A (en) Urban three-dimensional model data preprocessing method suitable for high-efficiency rendering
CN107945099B (en) OpenGL-oriented attribute configuration optimization method
CN103377269A (en) Sensor data positioning method and device
CN106990913B (en) A kind of distributed approach of extensive streaming collective data
CN109144853B (en) Software defined radio SoC chip debugging system
CN102495710B (en) Method for processing data read-only accessing request
CN114547199A (en) Database increment synchronous response method and device and computer readable storage medium
CN105677801B (en) Data processing method and system based on graph
CN114003385A (en) Parallelization method for improving post-processing performance
US11475017B2 (en) Asynchronous data enrichment for an append-only data store
CN110807073A (en) Open-source-based WEBGIS (web geographic information system) two-dimensional and three-dimensional integration realization method
CN111062856B (en) Optimized OpenGL graphic attribute arrangement method
CN104616332A (en) Fast display method
CN104182522A (en) Secondary indexing method and device on basis of circulation bitmap model
CN111047503B (en) Attribute storage and assembly optimization circuit of vertex array class command

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant