mirror of https://github.com/stella-emu/stella.git
Huge speedup in OpenGL rendering, by only updating part of the texture
instead of the entire area. This fixes the speed regression from 3.6, since the main TIA texture is now larger than before. Previously it was 160 pixels wide out of 256 total (rounded to power of two), now it's 560 wide out of 1024 total. In 3.6 it was updating a buffer 256 pixels wide, in the latest beta releases it was sending 4 times as much data (256 -> 1024). Now it sends only 160/560. Similar improvements happened with the height as well (210 lines vs 256). On my test systems at least, this is an extremely large win, resulting in similar speeds as 3.6 even though we've moved to a 32-bit framebuffer. Bumped version # for next beta release. Pushed release date to June 1, to make absolutely sure I have everything fixed and ready to go. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2493 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
e1ebfec032
commit
b200260d85
|
@ -12,7 +12,7 @@
|
|||
Release History
|
||||
===========================================================================
|
||||
|
||||
3.6.1 to 3.7: (May 25, 2012)
|
||||
3.6.1 to 3.7: (June 1, 2012)
|
||||
|
||||
* Added Blargg TV effects, with presets for Composite, S-video, RGB,
|
||||
and badly adjusted TV, and well as a custom mode with full
|
||||
|
|
|
@ -9,4 +9,4 @@ the Stella Website at:
|
|||
Enjoy,
|
||||
|
||||
The Stella Team
|
||||
May 25, 2012
|
||||
June 1, 2012
|
||||
|
|
|
@ -2,7 +2,7 @@ stella (3.7-1) stable; urgency=high
|
|||
|
||||
* Version 3.7 release
|
||||
|
||||
-- Stephen Anthony <stephena@users.sf.net> Fri, 25 May 2012 18:38:25 +0200
|
||||
-- Stephen Anthony <stephena@users.sf.net> Fri, 1 Jun 2012 18:38:25 +0200
|
||||
|
||||
|
||||
stella (3.6.1-1) stable; urgency=high
|
||||
|
|
|
@ -256,7 +256,9 @@ void FBSurfaceGL::update()
|
|||
// and antialiasing
|
||||
myGL.ActiveTexture(GL_TEXTURE0);
|
||||
myGL.BindTexture(GL_TEXTURE_2D, myTexID);
|
||||
myGL.TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, myTexWidth, myTexHeight,
|
||||
myGL.PixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
myGL.PixelStorei(GL_UNPACK_ROW_LENGTH, myPitch);
|
||||
myGL.TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, myImageW, myImageH,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
myTexture->pixels);
|
||||
|
||||
|
@ -313,7 +315,9 @@ void FBSurfaceGL::reload()
|
|||
myGL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
|
||||
// Create the texture in the most optimal format
|
||||
myGL.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, myTexWidth, myTexHeight, 0,
|
||||
myGL.PixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
myGL.PixelStorei(GL_UNPACK_ROW_LENGTH, myPitch);
|
||||
myGL.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, myTexWidth, myTexHeight, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
myTexture->pixels);
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ FBSurfaceTIA::FBSurfaceTIA(FrameBufferGL& buffer)
|
|||
myGL(myFB.p_gl),
|
||||
myTexture(NULL),
|
||||
myVBOID(0),
|
||||
myBaseW(0),
|
||||
myBaseH(0),
|
||||
myScanlinesEnabled(false),
|
||||
myScanlineIntensityI(50),
|
||||
myScanlineIntensityF(0.5)
|
||||
|
@ -142,7 +144,9 @@ void FBSurfaceTIA::update()
|
|||
// Update TIA image (texture 0), then blend scanlines (texture 1)
|
||||
myGL.ActiveTexture(GL_TEXTURE0);
|
||||
myGL.BindTexture(GL_TEXTURE_2D, myTexID[0]);
|
||||
myGL.TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, myTexWidth, myTexHeight,
|
||||
myGL.PixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
myGL.PixelStorei(GL_UNPACK_ROW_LENGTH, myPitch);
|
||||
myGL.TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, myBaseW, myBaseH,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
myTexture->pixels);
|
||||
|
||||
|
@ -225,7 +229,9 @@ void FBSurfaceTIA::reload()
|
|||
myGL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
|
||||
// Create the texture in the most optimal format
|
||||
myGL.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, myTexWidth, myTexHeight, 0,
|
||||
myGL.PixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
myGL.PixelStorei(GL_UNPACK_ROW_LENGTH, myPitch);
|
||||
myGL.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, myTexWidth, myTexHeight, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
myTexture->pixels);
|
||||
|
||||
|
@ -237,7 +243,9 @@ void FBSurfaceTIA::reload()
|
|||
myGL.TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
|
||||
static uInt32 const scanline[2] = { 0x00000000, 0xff000000 };
|
||||
myGL.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 1, 2, 0,
|
||||
myGL.PixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
myGL.PixelStorei(GL_UNPACK_ROW_LENGTH, 1);
|
||||
myGL.TexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 2, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
scanline);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <cstdlib>
|
||||
|
||||
#define STELLA_VERSION "3.7_beta2"
|
||||
#define STELLA_VERSION "3.7_beta3"
|
||||
#define STELLA_BUILD atoi("$Rev$" + 6)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -108,7 +108,7 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version}
|
|||
%_datadir/icons/large/%{name}.png
|
||||
|
||||
%changelog
|
||||
* Fri May 25 2012 Stephen Anthony <stephena@users.sf.net> 3.7-1
|
||||
* Fri Jun 1 2012 Stephen Anthony <stephena@users.sf.net> 3.7-1
|
||||
- Version 3.7 release
|
||||
|
||||
* Fri Mar 16 2012 Stephen Anthony <stephena@users.sf.net> 3.6-1
|
||||
|
|
Loading…
Reference in New Issue