Skip to content

GL API Errors on AMD FOSS drivers #1

Closed

Description

@sarnex

Hi guys.

When I try the Dota 2 Reborn beta, there are constantly these errors:
Mesa: User error: GL_INVALID_VALUE in glScissor
Mesa: User error: GL_INVALID_OPERATION in glUseProgramStages(program not linked)

Here is my complete steam log
https://gist.github.com/sarnex/554f58fb28ce991c19b9#file-dota-2-reborn

My system info:
Radeon 7950, Mesa git, Kernel 4.1.0, Gentoo Linux

Let me know if you need more infromation.

Thanks,
sarnex

Activity

  1. self-assigned this
    on Jun 23, 2015
  2. sarnex commented on Jun 23, 2015

    @sarnex
    Author

    The menu graphics are also very glitchy, sometimes they don't appear or are flickering. I don't know if it's related.

  3. Plagman commented on Jun 23, 2015

    @Plagman
    Member

    Looks like we use a few extensions that are not supported by the radeonsi driver yet. We could do a better job of detecting that and failing to start, but I would let the Mesa people know about this regardless.

  4. imirkin commented on Jun 23, 2015

    @imirkin

    glScissor returning INVALID_VALUE means that negative width/height are being passed in. Mesa should support ARB_sso on all drivers, but it's one of the less-tested extensions (or rather, one of the ones with the biggest test surface), so the glUseProgramStages thing could happen for a million different reasons.

  5. imirkin commented on Jun 23, 2015

    @imirkin

    FWIW this is the code that generates the sso error. I'm in the process of getting the game, so I can't tell if these conditions are actually met and it's correctly returning that error or not.

      /* Section 2.11.4 (Program Pipeline Objects) of the OpenGL 4.1 spec
       * says:
       *
       *     "If the program object named by program was linked without the
       *     PROGRAM_SEPARABLE parameter set, or was not linked successfully,
       *     the error INVALID_OPERATION is generated and the corresponding
       *     shader stages in the pipeline program pipeline object are not
       *     modified."
       */
      if (!shProg->LinkStatus) {
         _mesa_error(ctx, GL_INVALID_OPERATION,
                     "glUseProgramStages(program not linked)");
         return;
      }
    
  6. Plagman commented on Jun 23, 2015

    @Plagman
    Member

    I don't have a setup that can reproduce this, but if you find any problems with the engine's use of ARB_sso let us know!

  7. imirkin commented on Jun 23, 2015

    @imirkin

    OK, so the sso failures were mesa's bad. Patch available at http://patchwork.freedesktop.org/patch/52603/ . Will merge soonish unless people point out some issue.

    However the glScissor errors are pretty unambigiously Dota 2 Reborn's bad. You can see this yourself in the trace... just a few examples below, but there are tons:

    764104 @1 glScissor(x = 1, y = 0, width = -1, height = 65573)
    748602 @1 glScissor(x = -16313741, y = -16313738, width = -16313741, height = -1643902141)
    742166 @1 glScissor(x = 48, y = 53, width = -1, height = 65589)
    724556 @1 glScissor(x = -16313741, y = -16313738, width = -16313741, height = -1643902141)
    

    These happen a ton in the trace, and either width or height being negative is illegal in GL.

  8. imirkin commented on Jun 23, 2015

    @imirkin

    One thing to note is that the radeonsi driver doesn't support ARB_viewport_arrays, and you're querying MAX_VIEWPORTS and getting 0 back, so perhaps you're looping over # of viewports somewhere and so you end up not setting anything? Just a guess based on an observation airlied made on IRC.

  9. gdrewb-valve commented on Jun 23, 2015

    @gdrewb-valve
    Contributor

    Yes, the viewport array issue is exactly what you describe, we are not checking for the presence of the extension.

  10. danginsburg commented on Jun 23, 2015

    @danginsburg

    I've checked in a fix for the GL_ARB_viewport_array issue and confirmed it can cause uninitialized scissor values (as well as viewport values). The fix will be in the next update.

  11. added this to the next release milestone on Jun 23, 2015
  12. gdrewb-valve commented on Jun 24, 2015

    @gdrewb-valve
    Contributor

    The viewport errors should be resolved in the 6/25 update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions