fragment function is consuming most of the time to read a 1KB constant buffer.can we create global constant buffer used by both vertex and fragment function? then it can resolve my problem I guess.
Post
Replies
Boosts
Views
Activity
When I used simd data types for my structs in shader then data spilling decreased a lot and I unrolled "For" loops manually in my shader then my shader works faster but I am not still able to understand why simd data types decreased data spilling while normal metal data types exceeded available registers limit in GPU.
Issue was using metal data types not simd data types in structs and "usage of for loops". now I used simd data types and unrolled "for loops" manually then fragment function works very fast. but why metal compiler is not unrolling for loops automatically? and why is simd data types are faster?