[PATCH 5/6] d3d8: Retrieve the material from the primary stateblock.