vk: Fix geometry-shader input varying locations
Bug: skia: Change-Id: I60e0c25fa05ea53b0969fdee54620bec639ae159 Reviewed-on: https://skia-review.googlesource.com/24440 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
parent
c432b0ca8a
commit
135e446b9f
@ -71,11 +71,12 @@ void finalize_helper(GrVkVaryingHandler::VarArray& vars) {
|
||||
var.addLayoutQualifier(location.c_str());
|
||||
|
||||
int elementSize = grsltype_to_location_size(var.getType());
|
||||
SkASSERT(elementSize);
|
||||
SkASSERT(elementSize > 0);
|
||||
int numElements = 1;
|
||||
if (var.isArray()) {
|
||||
if (var.isArray() && !var.isUnsizedArray()) {
|
||||
numElements = var.getArrayCount();
|
||||
}
|
||||
SkASSERT(numElements > 0);
|
||||
locationIndex += elementSize * numElements;
|
||||
}
|
||||
// Vulkan requires at least 64 locations to be supported for both vertex output and fragment
|
||||
|
Loading…
Reference in New Issue
Block a user