[PATCH 1/4] d3d9: Retrieve the material from the primary stateblock.