Although USSC decisions affect the nation as a whole, the effect of them overturning or upholding a particular decision may not actually create a precedent. For example, if the USSC refuses to hear a case (i.e., does not grant certoriari), that will uphold a lower court decision but create no precedent.
In the case of Prop 8, upholding Walker’s decision may also not create a nationwide precedent legalizing gay marriage. What Judge Walker’s opinion actually decided was that Prop. 8 was not legally passed because it had no rational government interest in discriminating between opposite-sex and same-sex couples. On appeal, the biggest question has been the standing of the defendant intervenor (the proposition proponents). If the 9th Circuit and the USSC decide the case on that question, then it will set no precedent about the legality of same-sex marriage, even though same-sex marriage would then be legal in California.
The standing issue is treated as a foundational issue: If you don’t have standing to bring a case, then, whatever the merits of your argument may be, the case shouldn’t exist and you lose. An important case on standing is, for example, Lujan v. Defenders of Wildlife. Because the USSC ruled against the Defenders of WIldlife group on a standing issue, it never addressed their complaints about regulations affecting the Endangered Species Act. So while the regulations were “upheld,” their constitutionality was never ruled on.
The same could very well happen in Perry v. Schwarzenegger. If the 9th circuit rules against the Prop 8 opponents on standing (which appears likely) and if they appeal (which is almost certain), and if the USSC accepts the case (which is anybody’s guess), then the standing issue is the first one the USSC will address. Only if they decide to grant standing will they rule on the merits of the discrimination complaint. Only if that happens would it set a nationwide precedent about the substantive issue of the constitutionality of Prop 8.
Even then, the constitutional precedent may be limited in application. The USSC may decide that, for example, Prop 8 advanced no legitimate government interest. That does not mean that all anti-gay-marriage statutes fail for the same reason. As mentioned above, the CA proponents did a truly pathetic job of defending a proposed government interest, but it is conceivable that some legislators in another state would do a better job of identifying and defending a legitimate government interest that would justify an anti-gay-marriage law.
Bottom line: You can’t say that a USSC decision that has the effect of striking down Prop 8 automatically sets a nationwide precedent legalizing gay marriage.