Bug with VertexShaders enabled

Discussion in 'Player Support' started by Shillingworth, Nov 25, 2012.

  1. Shillingworth Augur

    I know the game is not supported under Linux (via Wine) but this revealed a problem that may reflect what happens on Windows under the same conditions.

    When EQ is initialing the vertex data for models it seems to make a call into GetDeviceCaps, which I suspect is for checking MaxVertexBlendMatrices. From there it moves on to creating the vertex declaration based in part on that value, but doesn't seem to have a contingencies in place to handle cases where MaxVertexBlendMatrices is equal to 0. This causes it to specify a vertex format mask (0xFE) which doesn't map against a valid vertex format.

    The solution is rather simple to get around the bug, set 'VertexShaders=0' in 'eqclient.ini' while the game is starting, once in game turn it back on via Options->Display->Advanced. It causes the game to carry out bone transforms on the CPU from what I can tell and thus vertex blend matrices don't come into play.

    Proposed solution: check against MaxVertexBlendMatrices during initialization, if it's 0 follow the same initialization path that would have been followed if 'VertexShaders=0'.
  2. Sarkaukar Augur

    What was the initial issue that you ran into? Was it or is it the same issue as listed in the linked thread, issues with invisible character models and such?
    http://www.winehq.org/pipermail/wine-bugs/2012-July/329502.html

    Question, is this with Luclin enabled models only or does it affect the original EQ models?

    Remember the code is 10+ years old.

    The switch to change VertexShaders=0 was added somewhere around 2004, after Dx9 became a requirement. iirc, to allow EQ to work with some older cards to work as well as any newer cards by passing off the workload from the GPU to the CPU to render VextexShader. Checking it in game, unless it has been changed, does not enable it until the game has been restarted, which then you are back at whatever issue you were running into. It is at least one of the two items that takes a game restart, again, afaik.

    PS. for others, the "hw" in the Vertex Shader line means video card hardware. Unchecking it forces it to switch to rendering (after game restart) with the CPU carrying the load for the software.