이 창을 사용하려면 목록에서 셰이더를 선택합니다. 그러면 셰이더의 소스와 정적 분석 통계를 표시하는 새 탭이 생성됩니다.
파이프라인의 특정 단계에 결합된 특정 셰이더를 보려면 파이프라인 뷰에서 해당 단계를 확인하세요.
그림 1. Shader 창
셰이더 코드 선택
SPIR-V 또는 GLSL(가능한 경우) 중 하나를 선택할 수 있습니다. 참고:
SPIR-V 코드가 OpSource 명령어에 원본 GLSL 코드를 제공하는 경우 GLSL 탭에는 동일한 코드가 표시됩니다. 그렇지 않은 경우 AGI는 SPIRV-Cross를 사용하여 SPIR-V를 GLSL로 디컴파일하려고 시도합니다.
디컴파일에서 오류가 발생하면 GLSL 소스 코드를 표시하는 옵션을 사용할 수 없습니다.
정적 분석
AGI는 SPIR-V 셰이더의 정적 분석에서 얻은 통계를 제공합니다. 지원되는 통계는 다음과 같습니다.
통계
설명
ALU 안내
ALU를 사용하는 셰이더의 명령 수입니다.
텍스처 안내
셰이더에서 텍스처 가져오기 횟수입니다.
지점 안내
셰이더의 분기 명령 수입니다.
최대 임시 등록 압력
동시 활성 임시 레지스터의 최대 개수입니다. 임시 값의 전체 기간은 정의에서 시작되어 셰이더에서 마지막으로 사용될 때 종료됩니다. 통계는 각 실시간 값이 사용하는 레지스터 수에 p를 더합니다 (예: 4D 부동 소수점은 4개의 레지스터).
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Shader pane\n\nThe **Shader** pane allows you to see individual shaders used in the trace.\n\nTo use this pane, select a shader in the list. This creates a new tab that shows\nthe shader's source as well as static analysis statistics.\n\nTo see the specific shader bound to a specific stage in the pipeline, view that\nstage in the [**Pipeline** view](/games/agi/refdocs/pipeline-view-pane).\n**Figure 1.** **Shader** pane\n\nSelect shader code\n------------------\n\nYou can select either **SPIR-V** or, if possible, **GLSL**. Note:\n\n- If the SPIR-V code provides the original GLSL code in its OpSource instruction, the **GLSL** tab simply shows the same code. If not, AGI attempts to decompile the SPIR-V into GLSL using SPIRV-Cross.\n- If an error occurs in the decompilation, the option to show GLSL source code isn't available.\n\nStatic analysis\n---------------\n\nAGI provides statistics from a static analysis of the SPIR-V shader. Here are\nthe statistics supported:\n\n| Statistic | Description |\n|----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ALU Instructions | Number of instructions in the shader that uses the ALU. |\n| Texture Instructions | Number of texture fetches in the shader. |\n| Branch Instructions | Number of branching instructions in the shader. |\n| Peak Temporary Register Pressure | The highest number of concurrently live temporary registers. A temporary value's lifetime starts at its defition and ends at its last use in the shader. The statistic adds *p* the number of registers each live value uses (for example, a 4D float would be 4 registers). |"]]