Commits on Apr 2, 2009
Commits on Jul 26, 2006
  1. Fix texture memory leak on glDeleteTextures

    jeremy@ezr committed Jul 25, 2006
  2. Return the right error code.

    jeremy@ezr committed Jul 25, 2006
Commits on Feb 18, 2006
  1. Random tweaks. Most important, fix the perfmeter, which was broken

    by what looks to be a compiler bug (something about not doing proper
    callee-saved FP registers, I think).
    jsgf committed Feb 18, 2006
  2. Add an adjustment to each matrix. This allows a scale/translate to be

    applied to each matrix before it is loaded into hardware.  This is useful
    for implementing flipped textures, and also to deal with the difference
    between OpenGL and PSP in interpreting integer vertex and texture coords
    (OpenGL treats them as plain integers, PSP treats them as -1 - 1).
    jsgf committed Feb 18, 2006
  3. Update the use of the VFPU to be a bit more efficient and correct.

    Other tweaks about the place.
    jsgf committed Feb 18, 2006
Commits on Jan 26, 2006
  1. PSPGL: Use the VFPU for almost all matrix manipulation. PSPGL

    persistently stores the top of the current matrix stack in VFPU matrix
    7, and uses matrices 5&6 for temporary operations.  It uses libvfpu to
    manage the VFPU's matrix resources, to coordinate with other programs
    using the VFPU.
    jsgf committed Jan 26, 2006
  2. Only set texture coord transforms if the texture matrix is non-identity.

    This might be useful for performance, and it's a good place for hooking
    in texgen later on.
    jsgf committed Jan 26, 2006
Commits on Jan 20, 2006
  1. Finally, make the GL_TEXTURE matrix work. The tricky part is that

    the PSP hardware only uses a 4x3 texture matrix, but in a strange (but
    sensible, in retrospect) way.  Because texture coords are only 2D, the
    nominal homogenious texture coords are (x,y,0,1).  Since z always ==
    0, there's no point in having a row in the matrix to transform them,
    so the texture matrix only has rows 0,1,3.
    
    I don't know what happens if you feed either positions or normals into
    the texture matrix; maybe it uses rows 0,1,2 then.
    
    Anyway, at least for the simple case I've tested, glMatrixMode(GL_TEXTURE)
    is now useful.
    jsgf committed Jan 20, 2006
Commits on Jan 19, 2006
  1. When setting the draw buffer, actually point the hardware to that buf…

    …fer (otherwise
    
    it won't take effect until the next buffer swap, by which time it may be too late...)
    jsgf committed Jan 19, 2006
  2. Use __builtin_clz for lg2() to take advantage of the Allegrex instruc…

    …tion. Also
    
    scatter some gcc attributes around to see if they make a difference.
    jsgf committed Jan 19, 2006
  3. Implement Pixel Buffer Objects. This allows two textures to share pixel

    data, or non-blocking glReadPixels, or single-copy glReadPixels into a
    texture, or multiple textures to share a colour map, or...  Very general,
    useful, powerful extension.
    jsgf committed Jan 19, 2006
  4. Implement GL_MESA_pack_invert, which is useful for getting non-upside…

    …-down
    
    screen grabs from GL.
    jsgf committed Jan 19, 2006
  5. Implement the useful parts of glPixelStorei

    jsgf committed Jan 19, 2006
Commits on Jan 16, 2006
  1. Allow caller to set drawing on the front buffer with glDrawBuffer, and

    set which buffer is read with glReadBuffer.  The only supported buffers
    are GL_FRONT and GL_BACK.
    jsgf committed Jan 16, 2006
  2. Fix pinning of buffers when drawing; previously, some buffers were

    not pinned if texturing was disables, potentially leading to premature
    freeing.
    jsgf committed Jan 16, 2006
Commits on Jan 14, 2006
  1. Don't bother aligning the results of __pspgl_dlist_insert_space(); it…

    … turns
    
    out the hardware doesn't need vertex arrays to be aligned, which is all
    its used for.
    jsgf committed Jan 14, 2006
  2. Use the "TOF_FLIPPED" flag for glCopyTexImage, to avoid having to do

    line-by-line copying from the screen.  Note that this will not flip the
    other mipmaps if you use glCopyTexImage to update just one mipmap level.
    jsgf committed Jan 14, 2006
  3. Buffers are allocated and freed so much, that its worth having a free…

    …list
    
    for them.  This is the prelude to a new type of transient buffer which
    contains data that's only live until the command which refers to it has
    been processed (for example, the results of converted vertex arrayes in
    the non-VBO/non-CVA case).
    jsgf committed Jan 14, 2006
  4. This change does two things:

      - move all the error handling code out of the hot path, to stop the
        icache from being polluted with mostly unused code
      - reduce overall code size, as a result of consolitading the error
        handling.
    It isn't clear that this makes much of a concrete difference, but its a
    start, and it's nice to make everything consistent.
    jsgf committed Jan 14, 2006
  5. Replace the surface color buffers with explicit front and back (which…

    … may
    
    refer to the same memory in the single-buffered case).  This simplifies
    all the code which cares about looking for the current front or back
    buffer.
    jsgf committed Jan 14, 2006
Commits on Jan 11, 2006
  1. Add missing file.

    jsgf committed Jan 11, 2006
  2. Add some more definitions and extensions to GLES/gl.h. This needs to

    be cleaned up somehow (share GL/glext.h, I guess).
    jsgf committed Jan 11, 2006
  3. When using glClear with the scissor test enabled, limit the clear

    rectangle to the scissor rectangle.
    jsgf committed Jan 11, 2006
  4. Load NULL pointer into depthbuffer pointer if there's no depthbuffer.

    It just seems cleaner.
    TODO: make sure depth testing is disabled if we switch the GL context
    to a surface without a depth buffer.
    jsgf committed Jan 11, 2006
  5. Make blending match what the hardware seems to be doing a bit better.

    Some OpenGL blend factors are not available in hardware, but they seem
    to be pretty unusual ones.
    jsgf committed Jan 11, 2006
  6. Add a flipped flag for texture objects, indicating they're upside down.

    This is used for textures derived from rendering, since the framebuffer
    layout convention is opposite to the texture layout convention.
    This allows flipped textures to be used without conversion by remapping
    the texture coord space.
    TODO: use this for glCopyTexImage.
    jsgf committed Jan 11, 2006
  7. Remove some unused stuff from timg. The original plan was to

    transparently convert the format of pixelbuffer object images in textures,
    but I don't think that's a good idea.
    jsgf committed Jan 11, 2006
  8. Add eglCreatePbufferSurface and eglBindTexImage. These allow you to

    create a Pbuffer surface, bind the GL context to it for rendering,
    and then use that Pbuffer as a texture image.  Ie, render-to-texture.
    
    This is not a flexible or powerful as the full framebuffer object
    extension, but it was simple to implement and its simple to use.
    jsgf committed Jan 11, 2006
  9. Cleanup and simplify the handing of dlists (ie, command queues).

    This removes them from the per-context state, and makes a single global
    set of command queues.  This makes sense because there's only one set
    of hardware, so there need only be one command queue to it.  This allows
    switching between contexts without requiring a full sync of the pipeline.
    Also, a lot of code relating to unused functionality was removed.
    jsgf committed Jan 11, 2006