AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO

Add options for Hlsl shader generator to allow register selection.

Đang mở
#2,145 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
2.1k
Fork
503
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello,

in the current state OCIO does not allow generated code to manually specify register slots (d3d11/12):

Example of generated code :

`Texture2D ocio_lut1d_0;
SamplerState ocio_lut1d_0Sampler;`

This makes reflecting compiled shader (Nearly) mandatory to find the binding location, which is not desirable in many cases.

It would be nice to have an option to be able to set first register slot by hand, then get them generated in a fixed way, for example :

`shaderDesc->setLanguage(GPU_LANGUAGE_HLSL_DX11);
shaderDesc->setFunctionName(functionName);
shaderDesc->setResourceStartSlot(1);
shaderDesc->setSamplerStartSlot(4);

Generated code would become:

`Texture2D ocio_lut1d_0 : register(t1);
SamplerState ocio_lut1d_0Sampler : register(s4) `

On a later stage, supporting bindless for latest d3d12/vulkan implementations would also be nice.

Thanks
Julien

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Xác định trình tạo shader HLSL và các entry point xử lý tùy chọn ShaderDesc, sau đó kiểm tra cách các khai báo texture và sampler được phát ra. Thêm các slot bắt đầu có thể cấu hình cho resource và sampler, đồng thời xác minh rằng HLSL D3D11/D3D12 được tạo ra có chứa các liên kết thanh ghi được yêu cầu.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp
Lĩnh vực
computer-graphics
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.