From: Brian P. <br...@tu...> - 2003-02-20 20:44:21
|
Greg Humphreys wrote: > The three variables that are exported from the state tracker for extensions > handling don't work in the top of tree build. When the render SPU tries to > access them, the pointers are bogus. > > I was able to fix the problem by declaring them __declspec(dllimport) in > include/cr_glstate.h. > > All the comments surrounding the code I looked at in tracking down this > problem indicate that the render SPU's dependency on the state tracker is > temporary and a hack. I don't know what the best way to fix this is, but > currently a simple __declspec(dllimport) [wrapped in an appropriate portable > set of IFDEF's of course] fixes the problem. I just hacked this into Dale's > tree so I don't have a version that I can check in. > > Can someone who's more familiar with the current state of extension string > handling put 5 minutes of thought into the best way to fix this problem? It > seems like some of the code there is temporary, so if I could, I'd like to > put in a vote for doing whatever the permanent fix would be. Those three strings should be moved out of the state tracker. They should live somewhere else. The question is where? We need them in a few different places in Chromium. I think there's two solutions: 1. a new util/extensions.c file with three new functions to access the strings. 2. a new include/cr_extensions.h file that declares the strings as static - so they're effectively duplicated in each compilation unit that includes the header. Any preference, Greg? -Brian |