Commit graph

6 commits

Author SHA1 Message Date
Nigel Stewart
3ad6fd770e Revised version of commit b92e6bb26a
Consolidation of various GL context limits into RegalEmu.h and ContextInfo
Improved array bounds checking for emulation
More querable states for GL database
Revision: Resolve Iff fixed-function lighting emulation perf regression.
2013-09-09 12:23:02 -05:00
Nigel Stewart
39a386c369 Revert "Consolidation of various GL context limits into RegalEmu.h and ContextInfo"
Due to performance regression in Emu::Iff

This reverts commit b92e6bb26a.
2013-09-06 12:08:08 -05:00
Nigel Stewart
b92e6bb26a Consolidation of various GL context limits into RegalEmu.h and ContextInfo
Improved array bounds checking for emulation
More querable states for GL database
2013-09-06 09:40:29 -05:00
Nigel Stewart
9f92aa94e7 Restructure scripts directory - scripts/api for database and Api code
Extend GL database to list per-extension information
EmuFilter layer - selective ES 2.0 filtering
Increase the strictness of emulation regex matching - must be unique
Initial implementation of JSON output
2013-02-12 14:22:00 -06:00
Nigel Stewart
59ccca97ee Rename Regal::RegalTexC to Regal::Emu::TexC
RegalSo sRGB support for ES 2.0
Add support for masking the buffer bits used for MD5 hashing purposes
RegalSo fixes and optimizations.
Helper functions for pixel components and bytes per component.
2013-01-09 21:55:57 -06:00
Lloyd Pique
f7793586a8 Implement a Texture Conversion Emulation recipe
A patch for issue #31.

Under an GLES2 API (and specifically Pepper implementation of GLES2),
calls to glTexSubImage2D may be required to use a type and format for
the new data that matches the underlying texture type/format, so that
the GLES2 implementation is a simple, straight copy of the data.

This means that in order for Regal to emulate the less strict OpenGL
interface, it must perform texture format conversions when calling a
GLES2 backend.

This patch adds such an emulation recipe, that:

1) Shadows the state of textures, so that Regal knows the underlying
formats, and
2) On a call to glTexSubImage2D, if the caller is passing something that
doesn't match the underlying texture format, Regal will handle the
conversion.

This patch makes a few assumptions that may need to be relaxed with
further changes:

* Only OpenGLES 2.0 compatible texture types and formats are supported.
  GL_BGRA and GL_UNSIGNED_BYTE_3_2_2 for example, while easy to add, are
  not. Other more general OpenGL formats could be added to, with a bit
  more work.
* As per the GLES2.x spec, only GL_UNPACK_ALIGNMENT is assumed to be
  relevant.
* To avoid a combinatorial explosion, all texture conversions are too
  and from a simple GL_RGBA, GL_UNSIGNED_BYTE intermedate format.
2012-12-19 13:34:36 -08:00