2009/4/21 Tobias Jakobi liquid.acid@gmx.net:
+struct ps_np2fixup_t {
- unsigned char idx[MAX_FRAGMENT_SAMPLERS]; /* indices to the real constant */
- GLfloat* const_cache; /* constant cache for fast reloading (without readback) */
- WORD swz; /* bitfield used to determine if we have to swizzle the constant */
- WORD num_consts;
+};
- I'm sure I mentioned this before, but please don't add code without using it. - Why is this in struct ps_compiled_shader? This really looks like something that should be internal to the backend. - What is the point of const_cache? - Writing "GLfloat* const_cache;" is legal C, but really doesn't make a lot of sense. The * is part of the declarator rather than the base type. An example like "int* p, q;" should make this more obvious. - swz is redundant. "prog->np2Fixup_data->swz & (1 << i)" really isn't more efficient than "idx & 1"