Technique for displaying shader tables associated with ray-traced images

By intercepting and interpreting shader table data in the GPU or graphics driver buffer, it solves the problem of difficult interpretation of shader table information in ray tracing images, achieves effective diagnosis and correction of ray tracing images, and improves the efficiency and effectiveness of image generation. quality.

CN112424836BActive Publication Date: 2024-08-30MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201980047001.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-19
Publication Date
2024-08-30
Estimated Expiration
2039-06-19

AI Technical Summary

Technical Problem

During the ray tracing image generation process, existing technology is difficult to effectively interpret and display shader table information, making it difficult for developers to diagnose and correct possible errors, affecting image generation efficiency and quality.

Method used

By intercepting and interpreting shader table data from the graphics processing unit (GPU) or graphics driver interception buffer, utilizing the processor and memory to determine the layout and parameters of the shader records and displaying the relevant information on the interface for developers to visualize and correct mistake.

Benefits of technology

It enables intuitive display and diagnosis of shader table information in ray tracing images, helping developers quickly identify and correct errors, and improving the efficiency and quality of image generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112424836B_ABST
    Figure CN112424836B_ABST
Patent Text Reader

Abstract

Examples described herein generally relate to intercepting a buffer from a graphics processing unit (GPU) or a graphics driver that specifies one or more shader records of a shader table to be used when generating an image using ray tracing, determining a layout of the one or more shader records based at least in part on identifiers of the one or more shader records, interpreting additional data in the buffer based at least in part on the layout to determine one or more parameters corresponding to the one or more shader records, and displaying, via an application, an indication of the one or more parameters on an interface.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] Today, the use of computing devices is becoming more and more common. Computing devices range from standard desktop computers to wearable computing technology, etc. One area of ​​computing devices that has grown in recent years is in the context of image rendering, such as rendering of games, video streaming, etc., which typically relies on a graphics processing unit (GPU) to render graphics from the computing device to a display device based on rendering instructions received from the computing device. Ray tracing of images is being developed as another solution to generate images via applications and request display of images via the GPU. In ray tracing, an application can define an image to be displayed, and acceleration structures can be defined to facilitate efficient generation of the image on the display.

[0002] The acceleration structure is used to quickly determine which objects in the scene a particular ray may intersect with, and to reject one or more objects that the ray will not hit. The determined objects can be drawn on the display based on information about the ray that intersects the object. In addition, in ray tracing, an application can define a shader table that specifies shaders to be called when a ray intersects or otherwise interacts with other objects in the ray-traced scene. When the ray intersects or interacts with other objects in the ray-traced scene, the GPU can draw the objects of the scene based on the ray, and can call the appropriate shader based on the shader table. Summary of the invention

[0003] A simplified overview of one or more examples is given below in order to provide a basic understanding of such examples. This overview is not an exhaustive overview of all contemplated examples, and is neither intended to identify key or important elements of all examples nor to define the scope of any or all examples. Its sole purpose is to present certain concepts of one or more examples in a simplified form as a prelude to a more detailed description presented later.

[0004] In one example, a computer-implemented method for displaying shader table information used when ray tracing an image is provided. The method includes intercepting a buffer from a graphics processing unit (GPU) or a graphics driver, the buffer specifying one or more shader records of a shader table to be used when generating an image using ray tracing, determining, by a computing device, a layout of the one or more shader records based at least in part on identifiers of the one or more shader records, interpreting, by the computing device, additional data in the buffer based at least in part on the layout to determine one or more parameters corresponding to the one or more shader records, and displaying an indication of the one or more parameters on an interface via an application executed on the computing device.

[0005] In another example, a computing device for displaying shader table information used when ray tracing an image is provided. The computing device includes: a memory storing one or more parameters or instructions for executing an operating system and one or more applications including a diagnostic application; and at least one processor coupled to the memory. The at least one processor is configured to intercept a buffer from a GPU or a graphics driver, the buffer specifying one or more shader records of a shader table to be used when generating an image using ray tracing, determine a layout of the one or more shader records based at least in part on an identifier of the one or more shader records, interpret additional data in the buffer based at least in part on the layout to determine one or more parameters corresponding to the one or more shader records, and display an indication of the one or more parameters on an interface via the diagnostic application.

[0006] In another example, a computer-readable medium is provided, the computer-readable medium including code executable by one or more processors to display shader table information used when ray tracing an image. The code includes code for the following operations: intercepting a buffer from a GPU or graphics driver, the buffer specifying one or more shader records of a shader table to be used when generating an image using ray tracing, determining a layout of the one or more shader records based at least in part on identifiers of the one or more shader records, interpreting additional data in the buffer based at least in part on the layout to determine one or more parameters corresponding to the one or more shader records, and displaying an indication of the one or more parameters on an interface via an application.

[0007] To accomplish the foregoing and related ends, one or more examples include features fully described below and particularly pointed out in the claims. The following description and the accompanying drawings set forth in detail certain illustrative features of one or more examples. However, these features are indicative of only a few of the various ways in which the principles of the various examples may be employed, and this description is intended to include all such examples and their equivalents. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 is a schematic diagram of an example of a computing device for determining and displaying shader table information for an image that can be ray traced by a graphics processing unit (GPU) according to examples described herein.

[0009] Figure 2 is a flow chart of an example of a method for determining and displaying shader table information according to examples described herein.

[0010] Figure 3 An example of a data flow for intercepting image data to determine and display shader table information according to examples described herein is shown.

[0011] Figure 4 An example of an interface for displaying shader table information according to examples described herein is shown.

[0012] Figure 5 An example of an interface for displaying error indications for root arguments in shader table information according to examples described herein is shown.

[0013] Figure 6 An example of an interface for displaying error indications for shader records in shader table information according to examples described herein is shown.

[0014] Figure 7 An example of an interface for displaying an error indication of root signature association in shader table information according to examples described herein is shown.

[0015] Figure 8 is a schematic diagram of an example of a computing device for performing the functions described herein. DETAILED DESCRIPTION

[0016] The detailed description set forth below in conjunction with the accompanying drawings is intended as a description of various configurations and is not intended to represent the only configuration in which the concepts described herein may be practiced. In order to provide a thorough understanding of the various concepts, the detailed description includes specific details. However, it will be clear to those skilled in the art that these concepts may be practiced without these specific details. In some cases, well-known components are shown in block diagram form to avoid obscuring these concepts.

[0017] Described herein are various examples related to displaying parameters related to a shader table defined in a ray tracing image. A shader table can specify which shader to call when light interacts with something in a ray tracing scene. For example, a shader table can include an array of shader records, each of which includes an identifier of a shader and a set of parameters that are passed to the shader when called. When a scene is traced by light and the light encounters a surface, the shader table can be indexed to select the shader to be executed (as well as the input parameters provided by the light, object, and shader record). Shader tables are usually stored and / or communicated in a collection of bytes, and may not be intuitive. In this regard, based on the corresponding ray tracing of the execution image (for example, in contrast to displaying or otherwise obtaining only the raw bytes of the shader table), buffer data corresponding to the shader table can be intercepted and interpreted to provide display of data in a more intuitive format. For example, data from various buffers can be intercepted to determine shader records being used, parameters related to shader records, etc., and parameters can be displayed to allow developers to visualize parameters when ray tracing an image and thus identify possible errors in ray tracing.

[0018] In a specific example, a buffer representing at least a portion of a shader table may be intercepted (e.g., from a graphics processing unit (GPU)). The buffer may include data indicating one or more shader records based on a shader record identifier, and corresponding data following the identifier. For example, the data in the buffer may indicate one or more shader records used at a certain moment during a ray tracing image. In this example, the buffer or another buffer may indicate an association between a shader record identifier and a root signature or other construct. In addition, in this example, the buffer or another buffer may indicate an association between a root signature and a data layout of a shader record. Thus, the shader record may be interpreted to determine one or more related parameters, and the data may be displayed in a format indicating one or more related parameters of a given shader record, and the data may represent the shader record at a certain moment during ray tracing. In one example, the buffer may also indicate a stride value between shader records to allow determination of where each shader record begins in the buffer.

[0019] Additionally, in one example, possible errors in shader records can be detected and identified to allow developers to visualize possible errors and / or correct instructions that cause errors. For example, errors can be detected in situations where expected values ​​cannot be determined from a buffer and / or where buffer data is otherwise determined to be at least partially corrupted. Thus, the concepts described herein are used to display information of shader tables and / or corresponding shader records that may otherwise be difficult to interpret to allow developers to quickly and efficiently identify possible errors in ray tracing and / or apply corresponding shaders to certain rays when performing ray tracing.

[0020] Now turn to Figures 1 to 8 , examples are depicted with reference to one or more components and one or more methods that can perform the actions or operations described herein, where the components and / or actions / operations in dashed lines may be optional. Figure 2 The operations described in the description are presented in a particular order and / or performed by example components, but in some examples, the order of actions and the components performing the actions may be changed depending on the implementation. In addition, in some examples, one or more of the following actions, functions, and / or described components may be performed by a specially programmed processor, a processor executing specially programmed software or computer-readable media, or by any other combination of hardware components and / or software components capable of performing the described actions or functions.

[0021] Figure 11 is a schematic diagram of an example of a computing device 100 and / or related components for determining and displaying shader table information for an image drawn using a GPU. For example, the computing device 100 may include a processor 104 and / or a memory 106, or may be otherwise coupled to the processor 104 and / or the memory 106, wherein the processor 104 and / or the memory 106 may be configured to execute or store instructions or other parameters related to determining or displaying shader table information, as described herein. The computing device 100 may execute an operating system 108 (e.g., via the processor 104 and / or the memory 106) to provide an environment for executing one or more applications. The computing device 100 may also include a GPU 114 for processing drawing instructions and / or transmitting associated commands to a display interface 116 to cause display of one or more images on a display, which may be coupled to the computing device 100 via a display port 118.

[0022] In one example, the display interface 116 can be communicatively coupled to the processor 104 and / or the memory 106 to communicate with a display (not shown) via a display port 118. The display port 118 mentioned herein can include one or more of various types of ports, including a High Definition Multimedia Interface (HDMI) port, a Display Serial Interface (DSI) port, a Mobile Industry Processor Interface (MIPI) DSI port, a Universal Serial Bus (USB) port, a FireWire port, or other embedded or external wired or wireless display ports that can enable communication between the computing device 100 and the display.

[0023] In one example, GPU 114 may be part of display interface 116 (e.g., a processor on a circuit board of display interface 116). In another example, GPU 114, display interface 116, etc. may be integrated with processor 104. Substantially any combination of hardware is possible, such that GPU 114, display interface 116, etc. may communicate with processor 104 via a bus to facilitate providing drawing instructions to GPU 114. GPU 114 may process the drawing instructions to draw an image, and may initiate display of at least a portion of the image on a display by transmitting associated signals to the display via display port 118 of display interface 116.

[0024] In one example, GPU 114 may support ray tracing and, therefore, may include ray tracing component 120 operable to receive proprietary structures 134, which may be generated by graphics driver 122, and perform ray tracing based on proprietary structures 134 to draw graphics via display interface 116. Graphics driver 122 may be specific to the manufacturer of GPU 114 and / or provided by the manufacturer of GPU 114 to generate proprietary structures 134 to instruct ray tracing component 120 to perform ray tracing to display images.

[0025] In one example, the application 124 may operate (e.g., via the operating system 108) to generate an image for display via the display interface 116. The application 124 may generate an acceleration structure 130, which may define geometry data for an image related to ray tracing, and the geometry data may include information about one or more objects in the image, positions corresponding to the one or more objects in the image, etc., so that a GPU with ray tracing capabilities (e.g., GPU 114) can simulate photons emitted via light, determine where the light reflects, trace the point where the light returns from the scene, etc. to generate an image. In one example, the application 124 may generate the acceleration structure 130 in a standardized format that may be provided to the graphics driver 122. The graphics driver 122 may generate a proprietary structure 134 based on the acceleration structure 130 to optimize the acceleration structure 130 for ray tracing on the GPU 114, wherein the proprietary structure 134 may be a proprietary format, and may include efficiencies, etc., known to the graphics driver 122 but not necessarily known to the application 124, the diagnostic application 126, etc.

[0026] In one example, the GPU 114 may optionally include a shader invocation component 136 for invoking a shader when ray tracing. For example, the shader invocation component 136 may invoke the shader based on one or more detected events associated with the shader (e.g., as defined by the application 124), such as detection of a ray interacting with something in a ray-traced scene. For example, based on detection of a ray interacting with a structure in a ray-traced scene, a shader table 160 may be defined (e.g., by the application 124) that specifies parameters related to the shader for execution. In one example, the application-defined shader table 160 may be a byte array stored in a GPU memory (e.g., a portion of the memory 106 allocated to the GPU 114, a memory physically on or near the GPU 114, where the GPU 114 is independent of the processor 104, etc.), which is used by a runtime (e.g., an operating system 108) and / or a driver (e.g., a graphics driver 122) to determine which shader to invoke when a ray interacts with something in a ray-traced scene. The shader table 160 may also specify which resources (eg, buffers, textures, etc.) are to be bound to or otherwise associated with each shader.

[0027] The operating system 108 may also include a diagnostic application 126 for determining and displaying certain diagnostic information related to the ray-traced image, which may allow a developer to view and analyze parameters, memory states, etc., when the image is ray-traced. For example, the diagnostic application 126 may determine and display shader table information related to shaders called during ray tracing, and may do so when the shaders are called and / or utilized during ray tracing. For example, the diagnostic application 126 may include an interception component 138 for intercepting data related to shaders initialized or used by the GPU 114 when performing ray tracing, which may include intercepting data from an application programming interface (API) call from the GPU 114 to obtain data related to the shader table 160 of the shader being called, intercepting data from the processor 104 to provide shader information to the GPU 114, and the like. For example, the diagnostic application 126 may be executed while the application 124 is executing and drawing an image via ray tracing, and / or may allow the application 124 to be paused to analyze the ray tracing data at a desired time. In this regard, the diagnostic application 126 may also include an interpretation component 140 for interpreting the intercepted data as additional shader table information associated with the intercepted data and / or a display component 142 for displaying or otherwise drawing the shader table information via an interface.

[0028] For example, the shader table information may be displayed via the display interface 116. In one example, the diagnostic application 126 may be executed on the same computing device 100, or may be executed as a diagnostic application 156 running on a different computing device 150 (where the different computing device 150 may have a separate processor, memory, operating system, etc. to execute the diagnostic application 156), so long as the diagnostic application 126, 156 can at least communicate with the GPU 114 (or related components) to determine and / or receive shader table information, related buffers, etc., as described herein. When displaying the shader table information, the diagnostic application 126, 156 may provide some additional context to allow interaction with the shader table information, more simplified identification of possible errors represented in the shader table information, and the like.

[0029] Figure 2 1 is a flowchart of an example of a method 200 for determining and displaying shader table information related to a shader called by a GPU when ray tracing or otherwise drawing an image. For example, the method 200 may be performed by the computing device 100, and thus reference is made to Figure 1 The description is provided as a non-limiting example of an environment for performing method 200 .

[0030] In method 200, at action 202, a buffer can be intercepted from a GPU or graphics driver, the buffer specifying one or more shader records of a shader table to be used when generating an image using ray tracing. In one example, an interception component 138 (e.g., in combination with a processor 104, a memory 106, a diagnostic application 126, 156, etc.) can intercept a buffer from a GPU 114 or a graphics driver 122 (e.g., or communication therebetween), the buffer specifying one or more shader records of a shader table to be used when generating an image using ray tracing. For example, the interception component 138 can intercept a buffer from a shader call component 136 that calls a shader to execute (e.g., when a ray interacts with another object in a ray tracing scene). For example, the interception component 138 can intercept a buffer in an API call for calling a shader by obtaining a portion of the memory 106 based on detecting a call to the shader, etc., wherein the API call can be received from the GPU 114.

[0031] In one example, the buffer may include a byte array having data related to a plurality of shader records in a shader table. Each shader record may start from a memory location represented by a span (e.g., number of bytes) in the buffer, and / or an initial shader record may start from a known memory location (e.g., the beginning of the buffer, a known offset from the beginning of the buffer, etc.). In one example, the span may be indicated in the buffer or in another intercepted or received information. In one example, the intercept component 138 may intercept span information when a shader or shader table is initialized as part of intercepting or otherwise receiving (e.g., via an API call to / from GPU 114) shader table information. In another example, the intercept component 138 may determine span information from the intercepted buffer (e.g., it may be indicated in the first n bytes or other known locations in the buffer, etc.). In addition, each shader record in the buffer may include a shader identifier in a known portion of a byte (e.g., the first n bytes or other known locations of a shader record). In this regard, as further described herein, given the stride and identifier length, a shader record and corresponding identifier may be determined from the buffer and used to retrieve additional shader record information.

[0032] In method 200, at act 204, a layout of one or more shader records may be determined based at least in part on an identifier of the one or more shader records. In one example, interpretation component 140 (e.g., in conjunction with processor 104, memory 106, diagnostic application 126, 156, etc.) may determine a layout of one or more shader records based at least in part on an identifier of the one or more shader records. For example, interpretation component 140 may also receive an indication of a relationship between a given shader record and a value associated with the layout of the shader record.

[0033] In one example, determining the layout in action 204 may optionally include, in action 206, identifying the layout in the previous buffer as being associated with the root signature of one or more shader records. In one example, the interpretation component 140 (e.g., in combination with the processor 104, the memory 106, the diagnostic application 126, 156, etc.) may identify the layout in the previous buffer as being associated with the root signature of one or more shader records. For example, based on the application 124 initializing a shader corresponding to one or more shader records, based on the application 124 providing shader information corresponding to one or more shader records to the GPU 114 (e.g., by intercepting the shader information from the application 124 and / or the GPU 114 or otherwise receiving the shader information, such as once the GPU 114 receives and establishes the shader and / or the corresponding shader table), etc., the interpretation component 140 may receive the previous buffer. For example, the interpretation component 140 may determine a list of corresponding layouts of the root signature and the shader record based on the data in the previous buffer. For example, the root signature may define a parameter layout, which is similar in concept to a function signature in a general programming language. For example, in the case of ray tracing, the root signature can be used to define the parameter layout of the shader within the shader record.For example, a prior buffer can be received as part of initializing a shader or a shader table.

[0034] Additionally, in this example, the interpretation component 140 can determine a root signature associated with the identifier of the shader record, which can be based on additional data in the buffer (e.g., data in the shader record following the shader identifier). In another example, the interpretation component 140 can receive an indication of a layout from an application 124, a GPU 114, etc., wherein the layout can indicate, for a given root signature, fields defined for a shader record having the root signature. The interpretation component 140 can then match the root signature of a given received shader record with the appropriate layout. For example, the layout can define other fields in the shader record data (e.g., field names, byte lengths, etc.) to facilitate interpretation of the data.

[0035] In method 200, at act 208, additional data in the buffer may be interpreted based at least in part on the layout to determine one or more parameters corresponding to one or more shader records. In one example, an interpretation component 140 (e.g., in combination with processor 104, memory 106, diagnostic application 126, 156, etc.) may interpret additional data in the buffer based at least in part on the layout to determine one or more parameters corresponding to one or more shader records. For example, interpretation component 140 may determine a layout associated with a root signature as described above, and may determine one or more related parameters such as a root constant, a root descriptor, or a root descriptor handle, etc., based on the layout accordingly. For example, the layout may indicate a number of bytes for each parameter, and interpretation component 140 may read parameter values ​​after an initial byte corresponding to an identifier, a root signature, etc.

[0036] In method 200, in action 210, an indication of one or more parameters can be displayed on the interface via an application. In one example, a display component 142 (e.g., in combination with a processor 104, a memory 106, a diagnostic application 126, 156, etc.) can display an indication of one or more parameters on the interface via an application (e.g., a diagnostic application 126, 156). Other renderings may also be possible, such as audio rendering, virtual reality display, etc. In addition, examples of possible interfaces are depicted and described herein. In one example, a shader record table in the buffer data can be displayed. In another example, a potential error detected can also be indicated on the interface. In addition, the method can continue to action 204 to determine, interpret, and display other shader records in the buffer data (e.g., subsequent shader records based on advancing a pointer to a subsequent memory location based on a span value).

[0037] In another example, at act 212, links to additional parameters may be displayed. In one example, display component 142 (e.g., in conjunction with processor 104, memory 106, diagnostic application 126, 156, etc.) may display links to additional parameters, which may include displaying parameter values ​​as links. For example, a link may indicate an offset in a data buffer corresponding to a given shader record, and activating the link may cause display of the actual bytes of data in the buffer corresponding to the shader record. In another example, a link may indicate a root structure, and activating the link may cause display of parameters related to the root structure itself, such as a layout.

[0038] In method 200, optionally, at act 214, potential errors can be detected in one or more parameters. In one example, interpretation component 140 (e.g., in combination with processor 104, memory 106, diagnostic application 126, 156, etc.) can detect potential errors in one or more parameters. For example, interpretation component 140 can detect invalid memory locations represented by data in a buffer, null values ​​in a buffer, partially corrupted records in which values ​​different from expected values ​​are detected in a buffer at one or more locations, etc. In this example, display component 142 can display an indication of the potential error to alert the developer. For example, detecting potential errors can include detecting values ​​in one or more parameters that are not within memory location boundaries, detecting null values ​​(e.g., null values ​​for root signatures), detecting invalid values ​​(e.g., invalid values ​​for root signatures, such as when the invalid value is not indicated in a mapping of the root signature to the layout), etc.

[0039] In other examples, displaying an indication of one or more parameters can also include mapping parameter values ​​to other values ​​indicated by application 124 (e.g., in an intercepted API call). For example, intercept component 138 can intercept an API call for associating a root signature with a tag. In this example, when interpreting the data, interpretation component 140 can determine the tag associated with the root signature, and display component 142 can display the tag instead of the root signature (or in addition to the root signature) when displaying the shader record data.

[0040] Figure 3 An example of a data flow 300 from image geometry data 302 created by an application (e.g., application 124) to image data of a drawn scene 310 is shown. In this example, an application such as application 124 can generate image geometry data 302 to be drawn on a display. Application 124 can combine image geometry data 302 with context information 304 to build an acceleration structure 130 representing the image geometry data 302. For example, context information 304 can include the location of objects within the image, the color of objects within the image, one or more shaders used to generate the image, etc. In any case, application 124 can build acceleration structure 130, which can include calling an API or other mechanism to generate a standardized acceleration structure 130. In one example, if the acceleration structure 130 is generated to include a bounding box, one or more shader tables 160 can also be created or otherwise determined or employed to define certain parameters of the image, such as object shape / orientation, shadow parameters, intersection points, etc., as described above.

[0041] The acceleration structure 130 may be used to generate a proprietary structure 134 (e.g., by a graphics driver) for instructing a GPU to ray trace an image of a drawn scene 310. For example, the proprietary structure 134 may be used to dispatch rays to a GPU (e.g., GPU 114) to perform ray tracing to generate the drawn scene 310. In another example, a shader table 160 may also be provided to call shaders to generate the drawn scene 310 based on the proprietary structure 134. Additionally, for example, the shader table 160 and / or related information, calls, parameters, etc. may be intercepted by the diagnostic application 126, 156, such as by receiving via an API call to / from the GPU 114, the application 124, etc. As described above, the diagnostic application 126, 156 may interpret the information to determine parameters related to the shader table, corresponding shader records, etc., which may be displayed when ray tracing an image for diagnostic purposes, as described above. Additionally, as described above, the application 124 may provide the image geometry data 302 and the diagnostic application 126 may allow the application 124 or a corresponding ray trace to be paused to step through the ray trace to analyze the shader table 160 at a given moment.

[0042] Figure 4 An example of an interface 400 for displaying shader records interpreted based on intercepted shader table buffer data is shown, as described herein. For example, interface 400 can display shader table information for shaders called at the moment of ray tracing an image. In one example, diagnostic applications 126, 156 can be executed while ray tracing is being performed, and an interface such as interface 400 or other interfaces described below can be displayed while ray tracing is occurring. In one example, diagnostic applications 126, 156 can include a pause function to pause ray tracing to allow inspection of shader table data, and / or can log shader table data for subsequent viewing, etc.

[0043] For example, the interface 400 can display the shader record identifier 402, the root signature 404, the root variable value or constant 406, the offset 408, etc. of the corresponding shader record, as described by the diagnostic application 126 via its various subcomponents, as described above. In addition, for example, as described above, the root signature 404 can be a link that causes the display of information about the root signature. In addition, the offset 408 can be a link that causes the data in the buffer to be displayed with a specified offset. In this example, the interface 400 can present a user-friendly display of the shader table 160 to help developers understand how the runtime / driver interprets its basic bytes. In this regard, the diagnostic application 126, 156 uses the additional context provided by the application 124 when capturing, such as the span / size parameters related to the shader table 160, the root signature, and the shader identifier mapping when capturing, to show how the runtime / driver interprets each byte of the shader table. This can enable developers to easily diagnose problems in their shader tables. Additionally, it may enable the diagnostic application 126, 156 to display automatic warnings that notify developers of potential problems with their shader tables, such as invalid shader identifiers or null descriptor handles, as further described and illustrated herein.

[0044] In addition, although shown and described with respect to shader tables 160, the concepts described herein can be used with other data that helps the GPU 114 understand how to ray trace or otherwise draw a scene. One such example can be data used by the GPU 114 when performing "indirect drawing" (also known as "ExecuteIndirect"). This can involve a "variable buffer" in the GPU memory, the contents of which specify the drawing commands that the GPU 114 should execute and the parameters used. For example, the concepts described herein for viewing shader tables can be applied to visualize the contents of an indirect variable buffer. In these examples and other examples to which these techniques can be applied, the diagnostic application 126, 156 can similarly interpret and provide a representation of the data (e.g., as a list of records).

[0045] Figure 5An example of an interface 500 for displaying shader records interpreted based on intercepted shader table buffer data and possible error indications is shown, as described herein. For example, the interface 500 can display an icon 502 indicating an error byte for parameter 1 at bytes 24 to 31. For example, the diagnostic application 126, 156 may have expected that this was a pointer to a resource in GPU memory corresponding to the root CBV, but may have detected that the byte corresponding to the parameter in the buffer data set (e.g., by the interpretation component 140, as described above) is invalid (e.g., outside the range of the parameter's memory location, etc.). The interpretation component 140 can detect the potential error, and the display component 142 can display the indicator icon 502 at the corresponding root argument value.

[0046] Figure 6 An example of an interface 600 for displaying shader records interpreted based on intercepted shader table buffer data and possible error indications is shown, as described herein. For example, interface 600 can display icon 602 indicating that the last four shader records in the table have no data. For example, this may be intentional (e.g., if the developer knows that they will not use these shader records at runtime), but it may be an error. Interpretation component 140 can detect this potential error as empty data in a table where records are expected (e.g., based on multiple records and / or span values), and display component 142 can display (multiple) indicator icons 602 at the corresponding record layout.

[0047] Figure 7 An example of an interface 700 for displaying shader records interpreted according to intercepted shader table buffer data and possible error indications is shown, as described herein. For example, the interface 700 can display an icon 702 indicating that the developer has not associated a root signature with the shader record. The interpretation component 140 can detect this potential error (e.g., based on detecting the shader record but not being able to determine the root signature (or determining a null value for the root signature)), and the display component 142 can display the indicator icon 702 at the corresponding root signature.

[0048] Figure 8 Shown include as in Figure 1 100. In one example, the computing device 100 may include a processor 104 for performing processing functions associated with one or more components and functions described herein. The processor 104 may include a single or multiple processors or a multi-core processor. In addition, the processor 104 may be implemented as an integrated processing system and / or a distributed processing system.

[0049] The computing device 100 may also include a memory 106, such as for storing local versions of applications executed by the processor 104, related instructions, parameters, etc. The memory 106 may include computer-usable memory types such as random access memory (RAM), read-only memory (ROM), tape, disk, optical disk, volatile memory, non-volatile memory, and any combination thereof. In addition, the processor 104 and the memory 106 may include and execute an operating system, one or more applications (such as the graphics driver 122, the diagnostic application 126 and / or components thereof, the display driver, etc., as described herein), and / or other components of the computing device 100 that execute on the processor 104.

[0050] In addition, the computing device 100 may include a communication component 802 for providing for establishing and maintaining communications with one or more other devices, parties, entities, etc. using the hardware, software, and services described herein. The communication component 802 can communicate between components on the computing device 100 and between the computing device 100 and external devices (such as devices located on a communication network and / or devices connected serially or locally to the computing device 100). For example, the communication component 802 may include one or more buses, and may also include a transmit chain component and a receive chain component associated with a wireless or wired transmitter and receiver, respectively, that are operable to interface with an external device. For example, the communication component 802 can communicate between the diagnostic application 126 and a GPU on another device, between distributed components of the diagnostic application 126, and the like.

[0051] In addition, the computing device 100 may include a data repository 804, which may be any suitable combination of hardware and / or software, that provides mass storage of information, databases, and programs used in conjunction with the examples described herein. For example, the data repository 804 may be or may include a data repository for applications and / or related parameters that are not currently being executed by the processor 104. Furthermore, the data repository 804 may be a data repository for an operating system, an application (such as a graphics driver 122, a diagnostic application 126, and / or components thereof, a display driver, etc., executed on the processor 104), and / or one or more other components of the computing device 100.

[0052] The computing device 100 may also include a user interface component 806 that is operable to receive input from a user of the computing device 100 and may also be operable to generate output for presentation to the user (e.g., via a display interface 116 to a display device). The user interface component 806 may include one or more input devices, including, but not limited to, a keyboard, a numeric keypad, a mouse, a touch-sensitive display, navigation keys, function keys, a microphone, a voice identification component, a gesture identification component, a depth sensor, a gaze tracking sensor, any other mechanism capable of receiving input from a user, or any combination thereof. In addition, the user interface component 806 may include one or more output devices, including, but not limited to, a display interface 116, a speaker, a tactile feedback mechanism, a printer, any other mechanism capable of presenting output to a user, or any combination thereof. In one example, the user interface component 806 may display or may include an interface 400, 500, 600, 700, or a similar interface to display memory usage information, as described herein.

[0053] The computing device 100 may also include a GPU 114 for drawing an image based on ray tracing instructions received from the processor 104, as described herein. The GPU 114 may additionally send a signal via the display interface 116 to cause the drawn image to be displayed on a display (not shown). Additionally, the computing device 100 may include a graphics driver 122 for providing ray tracing instructions (e.g., in a proprietary structure) to the GPU 114, as described herein, as described herein. Additionally, the computing device 100 may include a diagnostic application 126 for determining and displaying shader table information, as described herein.

[0054] For example, an element or any part of an element or any combination of elements can be implemented with a "processing system" including one or more processors. Examples of processors include microprocessors, microcontrollers, digital signal processors (DSPs), field programmable gate arrays (FPGAs), programmable logic devices (PLDs), state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform the various functions described throughout this disclosure. One or more processors in a processing system can execute software. Software should be broadly interpreted as referring to instructions, instruction sets, codes, code segments, program codes, programs, subroutines, software modules, applications, software applications, software packages, routines, subroutines, objects, executable files, execution threads, processes, functions, etc., whether referred to as software, firmware, middleware, microcode, hardware description languages, or other forms.

[0055] Therefore, in one or more examples, one or more functions described can be implemented in hardware, software, firmware or any combination thereof. If implemented in software, the function can be stored or encoded as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media. Storage media can be any available media that a computer can access. As an example and not limitation, such a computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer. Disks and optical disks used herein include compact disks (CDs), laser optical disks, optical disks, digital versatile disks (DVDs) and floppy disks, wherein disks usually copy data magnetically, while optical disks copy data optically by lasers. The above combination should also be included in the scope of computer-readable media.

[0056] The previous description is provided to enable any person skilled in the art to practice the various examples described herein. Various modifications to these examples will be clear to those skilled in the art, and the general principles defined herein can be applied to other examples. Therefore, the claims are not intended to be limited to the examples shown herein, but are consistent with the full scope consistent with the same language claims, wherein unless explicitly stated, the reference to an element in the singular is not intended to mean "one and only one", but "one or more". Unless otherwise specifically stated, the term "some" refers to one or more. All structural and functional equivalents of the elements of the various examples described herein known or to be known by a person of ordinary skill in the art are intended to be covered by the claims. Moreover, whether or not the content disclosed herein is explicitly stated in the claims, it is not intended to be disclosed to the public. Unless the element is explicitly stated using the phrase "means for ...", any claim element should not be interpreted as a means plus function.

Claims

1. A computer-implemented method for displaying shader table information used when ray tracing an image, comprising: intercepting a buffer from a graphics processing unit (GPU) or a graphics driver, the buffer specifying shader table information, the shader table information including one or more shader records of shaders to be used when generating the image using ray tracing; determining, by a computing device, a parameter layout within the buffer for one or more shaders corresponding to the one or more shader records based at least in part on identifiers of the one or more shader records; interpreting, by the computing device, the additional data in the buffer based at least in part on the parameter layout to determine one or more parameters corresponding to the one or more shader records; performing at least one of: detecting an invalid memory location in the one or more parameters, or detecting a null root signature associated with the one or more shader records based on the layout; as well as An indication of the one or more parameters is displayed on an interface via an application executing on the computing device, and an indicator of at least one of the invalid memory location or the null root signature is displayed.

2. The computer-implemented method of claim 1 , further comprising intercepting a prior buffer from the GPU or the graphics driver, the prior buffer specifying a root signature and the layout, wherein determining the layout comprises: associating the identifier of the one or more shader records with the root signature; as well as The layout corresponding to the root signature is identified in the previous buffer. 3 . The computer-implemented method of claim 2 , wherein associating the identifier of the one or more shader records with the root signature comprises identifying the root signature from the buffer.

4. The computer-implemented method of claim 1 , further comprising: intercepting a previous buffer from the GPU or the graphics driver, the previous buffer specifying a span between shader records in the shader table; identifying a second shader record based on a position of the span from the one or more shader records; determining a second layout of the second shader record based at least in part on a second identifier of the second shader record in the one or more shader records detected in the buffer; interpreting additional second data in the buffer based at least in part on the second layout to determine one or more second parameters corresponding to the second shader record; as well as A second indication of the one or more second parameters is displayed on the interface via the application executing on the computing device. 5 . The computer-implemented method of claim 1 , wherein the one or more parameters include at least one of: a root constant, a root descriptor, or a root descriptor handle.

6. The computer-implemented method of claim 1 , wherein displaying the indication of the one or more parameters comprises displaying a link to a root signature associated with the one or more shader records, wherein the link is associated with displaying additional parameters regarding the root signature.

7. The computer-implemented method of claim 1 , wherein displaying the indication of the one or more parameters comprises displaying a link to a byte offset in the buffer associated with the one or more shader records, wherein the link is associated with displaying a byte associated with the one or more shader records.

8. A computing device for displaying shader table information used when ray tracing an image, comprising: a memory storing one or more parameters or instructions for executing an operating system and one or more applications including a diagnostic application; as well as at least one processor coupled to the memory, wherein the at least one processor is configured to: intercepting a buffer from a graphics processing unit (GPU) or a graphics driver, the buffer specifying information including one or more shader records of shaders to be used in generating the image using ray tracing; determining, based at least in part on identifiers of the one or more shader records, a parameter layout within the buffer for one or more shaders corresponding to the one or more shader records; interpreting the additional data in the buffer based at least in part on the parameter layout to determine one or more parameters corresponding to the one or more shader records; as well as displaying, via the diagnostic application, an indication of the one or more parameters on an interface, wherein the at least one processor is further configured to intercept a prior buffer from the GPU or the graphics driver, the prior buffer specifying a root signature and the layout, wherein the at least one processor is configured to determine the layout at least in part by: associating the identifier of the one or more shader records with the root signature; and The layout corresponding to the root signature is identified in the previous buffer.

9. The computing device of claim 8, wherein the at least one processor is configured to associate the identifier of the one or more shader records with the root signature at least in part by identifying the root signature from the buffer.

10. The computing device of claim 8, wherein the at least one processor is further configured to: intercepting another prior buffer from the GPU or the graphics driver, the another prior buffer specifying a stride between shader records in the shader table; identifying a second shader record based on a position of the span from the one or more shader records; determining a second layout of the second shader record based at least in part on a second identifier of the second shader record in the one or more shader records detected in the buffer; interpreting additional second data in the buffer based at least in part on the second layout to determine one or more second parameters corresponding to the second shader record; as well as A second indication of the one or more second parameters is displayed on the interface via the diagnostic application.

11. The computing device of claim 8, wherein the at least one processor is configured to detect an invalid memory location in the one or more parameters, wherein the at least one processor is configured to display the indication of the one or more parameters as an indicator associated with the invalid memory location.

12. The computing device of claim 8, wherein the at least one processor is configured to detect an empty root signature associated with the one or more shader records based on the layout, wherein the at least one processor is configured to display the indication of the one or more parameters as an indicator of the empty root signature.

13. The computing device of claim 8, wherein the one or more parameters include at least one of: a root constant, a root descriptor, or a root descriptor handle.

14. The computing device of claim 8, wherein the at least one processor is further configured to display the indication of the one or more parameters as a link to another root signature associated with the one or more shader records, wherein the link is associated with displaying additional parameters regarding the another root signature.

15. The computing device of claim 8, wherein the at least one processor is further configured to display the indication of the one or more parameters as a link to a byte offset in the buffer associated with the one or more shader records, wherein the link is associated with displaying the bytes associated with the one or more shader records.

16. A non-transitory computer readable medium comprising code executable by one or more processors for displaying shader table information used when ray tracing an image, the code comprising code for: intercepting a buffer from a graphics processing unit (GPU) or a graphics driver, the buffer specifying information including one or more shader records of shaders to be used when generating the image using ray tracing; determining, based at least in part on identifiers of the one or more shader records, a parameter layout within the buffer for one or more shaders corresponding to the one or more shader records; interpreting the additional data in the buffer based at least in part on the parameter layout to determine one or more parameters corresponding to the one or more shader records; as well as displaying, via the application, an indication of the one or more parameters on an interface, Wherein the code for displaying displays the indication of the one or more parameters as a link to a root signature associated with the one or more shader records, wherein the link is associated with displaying additional parameters regarding the root signature.

17. The non-transitory computer-readable medium of claim 16, further comprising code for intercepting a prior buffer from the GPU or the graphics driver, the prior buffer specifying another root signature and the layout, wherein the code for determining the layout: associating the identifier of the one or more shader records with the another root signature; and The layout corresponding to the other root signature is identified in the previous buffer.

18. The non-transitory computer-readable medium of claim 16, further comprising code for detecting an invalid memory location in the one or more parameters, wherein the code for displaying displays the indication of the one or more parameters as an indicator associated with the invalid memory location.

19. The non-transitory computer-readable medium of claim 16, further comprising code for detecting a null root signature associated with the one or more shader records based on the layout, wherein the code for displaying displays the indication of the one or more parameters as an indicator of the null root signature.

Citation Information

Patent Citations

  • Architectures for parallelized intersection testing and shading for ray-tracing rendering

    CN102037497A

  • Multiple shader system and processing method thereof

    CN102254297A