2017-08-31 20:56 GMT+02:00 Paul Gofman gofmanp@gmail.com:
if (!param->object_id || base->objects[param->object_id].creation_failed)
It should be possible to replace this with a check for !*(void **)param->data. Unless you mean to use the flag for something else later on?
On 09/01/2017 02:37 AM, Matteo Bruni wrote:
2017-08-31 20:56 GMT+02:00 Paul Gofman gofmanp@gmail.com:
if (!param->object_id || base->objects[param->object_id].creation_failed)
It should be possible to replace this with a check for !*(void **)param->data. Unless you mean to use the flag for something else later on?
I explored how can I make a null shader in effect, and found that it is possible by just assigning 'null' to VertexShader in fx file. The important thing is, object gets id 0 which we now treat as an error.
So I suggest to:
- change this line to 'if (param->object_id && !*(void **)param->data)', don't add creation_failed flag, as it is now clear how to properly distinguish null shader from an unsupported one;
- after that add a separate test with null shader (concerning GetPassDesc and ValidateTechnique) as the next patch and fix d3dx9_base_effect_get_pass_desc() which also thinks object_id == 0 is a problem.