Rune Petersen wrote: > Brian Paul wrote: > >>Rune Petersen wrote: >> >>>Roland Scheidegger wrote: >>> >>> >>>>Rune Petersen wrote: >>>> >>>> >>>>>Hi, >>>>> >>>>>Quake3 causes fallback because r300_translate_vertex_shader() returns >>>>>early and doesn't translate the shader. >>>>> >>>>>The culprit: >>>>>if (!mesa_vp->Base.String) >>>>> return; >>>>> >>>>>To me it looks suspect because checking a pointer to the shader string >>>>>to verify that the parsed shader is valid doesn't make sense to me. >>>>>And this check i omitted for fragment translation which uses the same >>>>>structure. >>>>> >>>>>Anything obvious I missed? >>>> >>>>That check is there to check if a shader string was even specified in >>>>the first place (see the thread about "Radeon 9200 >>>>GetProgramiv(GL_VERTEX_PROGRAM_ARB,..." at the mesa3d-dev list). Maybe >>>>there is some trouble with that, in the case of quake3 and r300 I'd >>>>suspect it's because no string exists for the shader at all, because >>>>quake3 obviously doesn't use vertex shaders and it's internally >>>>generated by fixed function to shader conversion code. >>>> >>> >>>That is what I suspected. >>>The way I see it Base.String is always set along side the >>>Base.Instructions pointer. Since the the code actual depends on >>>Base.Instructions it makes more sense to check it. >>> >>>The only problem is I am unable to test if it failes as intended. >> >>If you remove the test for mesa_vp->Base.String does Quake3 work? > > > It does. > The Mesa generated shaders doesn't set Base.String making Base.String a > bad choice for checking the validity of the Base struct. > > I am just trying to find a check that is valid in all cases and can be > used by r300 & r200.
Does replacing the above test with this work? if (mesa_vp->Base.NumInstructions == 0) return GL_FALSE; -Brian ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel