KhronosGroup / KhronosGroup/Vulkan-Docs

64 b and array Fragment output

Open
#902 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

doubles ant longs cannot be written as color attachment directly:

Output values written by a fragment shader must be declared with either OpTypeFloat or OpTypeInt, and a Width of 32.

Even if the device otherwisely supports them. I assume because vec3 and vec4 would take two Location, which would prevent interfacing with color attachments:

Locations are consumed as described in Location Assignment.

A fragment shader output variable identified with a Location decoration of i is directed to the color attachment indicated by pColorAttachments[i],

Each element of the pColorAttachments array corresponds to an output location in the shader, i.e. if the shader declares an output variable decorated with a Location value of X, then it uses the attachment provided in pColorAttachments[X].

But that feels like API defect; perhaps some extension should figure some healthy way around this?

Not sure how array image color attachments would work. They do not seem to be forbidden in VU at vkCreateFramebuffer, but they would take N Locations. But at the same time the spec requires that Location and pColorAttachment index matches. Are array attachments allowed?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the cited Vulkan rules for fragment shader output types, Location Assignment, color attachments, and framebuffer creation. Determine how 64-bit outputs and array image attachments are specified, then document or clarify the intended behavior; completion requires a resolved specification answer rather than an implementation alone.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.