I found my pixel shader is limited by 3d attribute size. I couldn’t find any information about the “3D Attribute”. What does that means?
Hi hour10000,
Thank you for using Nsight Graphics. According to your screen shot, you are hovering over the ‘# Warp’ column, right?
According to the official doc of Nsight Graphics, it means:
# Warp: indicates the maximum theoretical warp occupancy. At the shader instance level, this is the maximum number of warps that can fit concurrently in an SM, if this shader was run in isolation. At the pipeline level, it shows the range of values across all shader stages’ shader instances. Hover over this cell for a tooltip that reports which resource(s) limited the theoretical warp occupancy. When dynamic conditions (such as the # of primitives) affect the calculation, a range of values is displayed for the two extreme cases.
Here is the original URL: User Guide — NsightGraphics 2024.3 documentation.
Thanks
An
Hello AYan.
I already know what does “# Warp” means.
I want to know about “3D Attribute”. What does affects to it.
Thanks
hour10000
Hi hour10000,
I get some explanation from our internal developer:
3D attributes are the per-vertex values (position, color, normal, texcoord, …) that are passed between stages. Pixel shaders only have input 3D attributes; PS outputs do not count towards this.
In HLSL, a pixel shader’s 3D attributes are specified as the input parameters to its “main” function. In the example below, struct PSInputs would comprise the 3D attributes, and it has 10 scalar attributes.
If a particular PS hit an occupancy limiter, the causes are some combination of (a) the # of per-vertex PS inputs is very large, (b) a large number of microtriangles.
struct PS_OUTPUT
{
float4 Color[4] : COLOR0;
float Depth : DEPTH;
};
struct PSInputs
{
float4 position : SV_POSITION;
float3 uv : TEXCOORD0;
float3 color : TEXCOORD1;
};
PS_OUTPUT MyPixelShader(PSInputs input)
{
// ... shader logic
}
Thanks
An
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.