Code Monkey home page Code Monkey logo

hlsl-constantbufferlayoutvisualizer's Introduction

hlsl-constantbufferlayoutvisualizer's People

Contributors

maraneshi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hlsl-constantbufferlayoutvisualizer's Issues

Potential error in footnote 6

First, I have to say, stellar work on this! ๐Ÿคฏ

I noticed this footnote, and would like to correct any error on the Wiki page this refers to, but I couldn't identify the error:

This page has a small error, it first lists the rules for structured buffers, which include "Structs are aligned by the max of it's member alignments", and then says
"legacy" constant buffer rules apply on top of that, which is not true for this specific rule as demonstrated in the example for <a href="#rule4">Rule #4</a>.

and then says "legacy" constant buffer rules apply on top of that, which is not true for this specific rule as demonstrated in the example for Rule #4.

This seems to imply a lack of basis for forcing alignment to 16 for structures in the document for Rule 4.

Under "Legacy" Constant Buffer Basics it says:

  1. Aggregates (arrays and structures) are always 16-byte row-aligned. ...

This point appears to be the basis for Rule 4, and it supersedes the basic type alignment rule when a struct appears in a cbuffer.

I think the basic point about alignment for the structure is that the structure itself does not force alignment of 16. The alignment to 16 is required when the struct is included inside a constant buffer.

Perhaps your interpretation of what's written is different than mine. If so, can you more clearly identify the error you're referring to?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.