allow binding float[n] variables to float[n-1] variables in Cg shaders

This commit is contained in:
rdb 2012-01-28 12:47:14 +00:00
parent fc8935035a
commit 72af325f2b

View File

@ -642,7 +642,7 @@ issue_parameters(GSG *gsg, int altered) {
int input_size = _ptr._dim[0] * _ptr._dim[1] * _ptr._dim[2];
// dimension is negative only if the parameter had the (deprecated)k_ prefix.
if ((input_size != ptr_data->_size) && (_ptr._dim[0] > 0)) {
if ((input_size > ptr_data->_size) && (_ptr._dim[0] > 0)) {
GLCAT.error() << _ptr._id._name << ": incorrect number of elements, expected "
<< input_size <<" got " << ptr_data->_size << "\n";
release_resources(gsg);