Re: [Mesa-dev] [PATCH] translate: fix buffer overflows

2014-03-04 Thread Jose Fonseca
Looks good. Adding a few assertions before dereferencing these arrays might come handy in the future. Jose - Original Message - > Because in draw we always inject position at slot 0 whenever > fragment shader would take the maximum number of inputs (32) it > meant that we had PIPE_MAX_A

[Mesa-dev] [PATCH] translate: fix buffer overflows

2014-03-03 Thread Zack Rusin
Because in draw we always inject position at slot 0 whenever fragment shader would take the maximum number of inputs (32) it meant that we had PIPE_MAX_ATTRIBS + 1 slots to translate, which meant that we were crashing with fragment shaders that took the maximum number of attributes as inputs. The a