If we don't, then the GPU could be busy and some of the objects destroyed
by the exception propagation could be in-use. This is something of a
stop-gap measure; the problem of exceptions and the GPU being busy is
something that needs to be solved in general. However, it does fix GPU
hangs on some drivers.
This is related to #20.
*outModule = module;
}
else
+ {
+ // Wait for the GPU to idle so that throwing the exception
+ // below doesn't free in-use GPU resource.
+ vki.deviceWaitIdle(device);
TCU_THROW(NotSupportedError, (de::toString(stage) + " is not supported").c_str());
+ }
}
}