From 1658c15ccabe9521d6a1b3532cd4d2b8678819c9 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 15 Jan 2016 14:25:16 -0800 Subject: [PATCH] Reserve last input slot for draw call info --- libraries/gpu/src/gpu/GLBackend.h | 2 +- libraries/gpu/src/gpu/Stream.cpp | 5 +---- libraries/gpu/src/gpu/Stream.h | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/libraries/gpu/src/gpu/GLBackend.h b/libraries/gpu/src/gpu/GLBackend.h index 85fada4016..31adb84040 100644 --- a/libraries/gpu/src/gpu/GLBackend.h +++ b/libraries/gpu/src/gpu/GLBackend.h @@ -193,7 +193,7 @@ public: static const int MAX_NUM_ATTRIBUTES = Stream::NUM_INPUT_SLOTS; - static const int MAX_NUM_INPUT_BUFFERS = 16; + static const int MAX_NUM_INPUT_BUFFERS = Stream::NUM_INPUT_SLOTS; size_t getNumInputBuffers() const { return _input._invalidBuffers.size(); } diff --git a/libraries/gpu/src/gpu/Stream.cpp b/libraries/gpu/src/gpu/Stream.cpp index ff765f3250..9bb12862d8 100644 --- a/libraries/gpu/src/gpu/Stream.cpp +++ b/libraries/gpu/src/gpu/Stream.cpp @@ -38,10 +38,7 @@ const ElementArray& getDefaultElements() { //INSTANCE_SCALE = 8, Element::VEC3F_XYZ, //INSTANCE_TRANSLATE = 9, - Element::VEC3F_XYZ, - //INSTANCE_XFM = 10, - // FIXME make a matrix element - Element::VEC4F_XYZW + Element::VEC3F_XYZ }}; return defaultElements; } diff --git a/libraries/gpu/src/gpu/Stream.h b/libraries/gpu/src/gpu/Stream.h index 4214b99b74..f73eb1adbc 100644 --- a/libraries/gpu/src/gpu/Stream.h +++ b/libraries/gpu/src/gpu/Stream.h @@ -40,8 +40,9 @@ public: INSTANCE_SCALE = 8, INSTANCE_TRANSLATE = 9, + DRAW_CALL_INFO = 15, // Reserve last input slot for draw call infos - NUM_INPUT_SLOTS = DRAW_CALL_INFO + 1, + NUM_INPUT_SLOTS = DRAW_CALL_INFO }; typedef uint8 Slot;