Announcement

Collapse
No announcement yet.

An OpenGL Optimization Extension Merged Into Mesa

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by Ancurio View Post
    As an example for this, how trivial would it be to add the GL_ARB_clear_texture extension within the current codebase?
    I'd estimate about a week...two if it goes badly, less if it goes well.
    Free Software Developer .:. Mesa and Xorg
    Opinions expressed in these forum posts are my own.

    Comment


    • #17
      Originally posted by Ancurio View Post
      As an example for this, how trivial would it be to add the GL_ARB_clear_texture extension within the current codebase?
      1 day if you know what to do. A lot more if you don't. Gallium has this already, the driver entrypoints are pipe_context::clear_render_target and pipe_context::clear_depth_stencil. Off the top of my head, they should already be implemented by all Radeon drivers, softpipe, and llvmpipe. If any driver doesn't implement the entrypoints, you can copy what softpipe does, which just calls generic utility functions. That should allow you to advertise GL_ARB_clear_texture for all Gallium drivers unconditionally.

      Comment


      • #18
        Originally posted by marek View Post
        1 day if you know what to do. A lot more if you don't. Gallium has this already, the driver entrypoints are pipe_context::clear_render_target and pipe_context::clear_depth_stencil. Off the top of my head, they should already be implemented by all Radeon drivers, softpipe, and llvmpipe. If any driver doesn't implement the entrypoints, you can copy what softpipe does, which just calls generic utility functions. That should allow you to advertise GL_ARB_clear_texture for all Gallium drivers unconditionally.
        Well yeah, that makes sense, as the glClearTexImage call would do little more than a classic glClear with an FBO targeting the texture bound.
        Can these gallium entry points you listed also clear arbitrary subrectangles of render targets? Actually, I'll go check in the code myself..

        Sounds like the perfect little patch to get someone started who wants to get into Mesa/Gallium development =)

        Comment


        • #19
          Code:
          /**
              * Clear a color rendertarget surface.
              * \param color  pointer to an union of fiu array for each of r, g, b, a.
              */
             void (*clear_render_target)(struct pipe_context *pipe,
                                         struct pipe_surface *dst,
                                         const union pipe_color_union *color,
                                         unsigned dstx, unsigned dsty,
                                         unsigned width, unsigned height);
          I guess that means yes.

          Comment

          Working...
          X