Framebuffer pixelpipeline CVA path: fog turned off (good, fixes F/A-18), simple render mode got better but still not working (unclear), some refactoring, resource usage optimised for CVA path
This commit is contained in:
parent
21db87ffbc
commit
1ee1544551
File diff suppressed because one or more lines are too long
|
@ -46,25 +46,26 @@ protected:
|
|||
int buildVertexArrays(const tilesize* tilesizetable, int vertexarrayindex);
|
||||
void set_gl_state(bool pixelpipeline);
|
||||
void restore_gl_state(bool pixelpipeline);
|
||||
// Pixel conversion
|
||||
enum TileUpdateState
|
||||
{
|
||||
TileUpdateState_TileEmpty = false,
|
||||
TileUpdateState_TileDownloadToGPU = 1, // true,
|
||||
TileUpdateState_TileDrawOnly = -1 // -true
|
||||
};
|
||||
static const int m_tileCount = MaxTiles * MaxTiles;
|
||||
GLuint m_textureNames[m_tileCount];
|
||||
static const int s_maxTiles = MaxTiles * MaxTiles;
|
||||
GLuint m_textureNames[s_maxTiles];
|
||||
inline TileUpdateState createTextureData(FxU32* texbuffer, FxU32 x, FxU32 y, FxU32 x_step, FxU32 y_step, int checksumIndex);
|
||||
inline TileUpdateState Convert565Kto8888(FxU16* buffer1, FxU32* buffer2, register FxU32 width, register FxU32 height, register FxU32 stride);
|
||||
#ifdef __ALTIVEC__
|
||||
inline TileUpdateState Convert565Kto8888_AV(FxU16* buffer1, FxU32* buffer2, register FxU32 width, register FxU32 height, register FxU32 stride, int checksumIndex);
|
||||
vector unsigned long m_tileChecksums[m_tileCount];
|
||||
vector unsigned long m_tileChecksums[s_maxTiles];
|
||||
#endif
|
||||
inline TileUpdateState Convert1555Kto8888(FxU16* buffer1, register FxU32* buffer2, FxU32 register width, register FxU32 height, register FxU32 stride);
|
||||
inline TileUpdateState ConvertARGB8888Kto8888(FxU32* buffer1, register FxU32* buffer2, FxU32 register width, register FxU32 height, register FxU32 stride);
|
||||
bool m_use_client_storage;
|
||||
bool m_useRectangleARB;
|
||||
bool m_must_clear_buffer;
|
||||
// Format
|
||||
GrOriginLocation_t m_origin;
|
||||
GLint m_glInternalFormat;
|
||||
GLint m_glFormat;
|
||||
|
@ -72,18 +73,22 @@ protected:
|
|||
bool m_format_valid;
|
||||
BufferStruct* m_framebuffer;
|
||||
BufferStruct* m_texbuffer;
|
||||
// Dimensions
|
||||
FxU32 m_width;
|
||||
FxU32 m_height;
|
||||
GLint m_x_step_start;
|
||||
GLint m_y_step_start;
|
||||
GLint m_x_step_start_opaque;
|
||||
GLint m_y_step_start_opaque;
|
||||
// Tiles
|
||||
inline int getTileCount() const;
|
||||
tilesize m_tilesizes[MaxTiles];
|
||||
int m_tilesizesCount;
|
||||
int m_tilesizesVertexArrayIndex;
|
||||
const tilesize* m_custom_tilesizes;
|
||||
int m_customtilesizesCount;
|
||||
int m_customtilesizesVertexArrayIndex;
|
||||
// Color, depth and alpha
|
||||
GLfloat m_glDepth;
|
||||
union
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@ stExtensionSupport glNecessaryExt[] =
|
|||
{ "GL_SGIS_texture_edge_clamp", OGL_EXT_DESIRED, &dummyExtVariable, &InternalConfig.EXT_SGIS_texture_edge_clamp },
|
||||
{ "GL_EXT_paletted_texture", OGL_EXT_DESIRED, &UserConfig.EXT_paletted_texture, &InternalConfig.EXT_paletted_texture },
|
||||
{ "GL_APPLE_packed_pixels", OGL_EXT_REQUIRED, &dummyExtVariable, &dummyExtVariable2 },
|
||||
{ "GL_APPLE_client_storage", OGL_EXT_DESIRED, &UserConfig.APPLE_client_storage, &InternalConfig.APPLE_client_storage },
|
||||
{ "GL_APPLE_client_storage", OGL_EXT_DESIRED, &UserConfig.APPLE_client_storage, &InternalConfig.APPLE_client_storage },
|
||||
{ "GL_EXT_compiled_vertex_array", OGL_EXT_DESIRED, &UserConfig.EXT_compiled_vertex_array,&InternalConfig.EXT_compiled_vertex_array },
|
||||
{ "GL_ARB_texture_rectangle", OGL_EXT_DESIRED, &UserConfig.ARB_texture_rectangle, &InternalConfig.ARB_texture_rectangle },
|
||||
#ifdef OPENGLIDE_SYSTEM_HAS_FOGCOORD
|
||||
|
@ -254,7 +254,7 @@ void GLExtensions(void)
|
|||
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, true);
|
||||
glReportError();
|
||||
}
|
||||
|
||||
// Anisotropic filtering
|
||||
if (InternalConfig.EXT_texture_filter_anisotropic)
|
||||
{
|
||||
GLint MaxAnisotropyLevel;
|
||||
|
|
Loading…
Reference in New Issue