Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
angle
Commits
0e0510fd
Commit
0e0510fd
authored
Oct 10, 2013
by
Jamie Madill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Place the method responsible for checking for fast pixel unpack buffer support into the Renderer.
TRAC #23997 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods
parent
6b9cb259
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
10 deletions
+19
-10
Texture.cpp
src/libGLESv2/Texture.cpp
+2
-1
formatutils.cpp
src/libGLESv2/formatutils.cpp
+0
-5
formatutils.h
src/libGLESv2/formatutils.h
+0
-2
Renderer.h
src/libGLESv2/renderer/Renderer.h
+1
-0
PixelTransfer11.cpp
src/libGLESv2/renderer/d3d11/PixelTransfer11.cpp
+1
-1
Renderer11.cpp
src/libGLESv2/renderer/d3d11/Renderer11.cpp
+7
-1
Renderer11.h
src/libGLESv2/renderer/d3d11/Renderer11.h
+1
-0
Renderer9.cpp
src/libGLESv2/renderer/d3d9/Renderer9.cpp
+6
-0
Renderer9.h
src/libGLESv2/renderer/d3d9/Renderer9.h
+1
-0
No files found.
src/libGLESv2/Texture.cpp
View file @
0e0510fd
...
...
@@ -22,6 +22,7 @@
#include "libEGL/Surface.h"
#include "libGLESv2/Buffer.h"
#include "libGLESv2/renderer/BufferStorage.h"
#include "libGLESv2/renderer/RenderTarget.h"
namespace
gl
{
...
...
@@ -232,7 +233,7 @@ bool Texture::fastUnpackPixels(const PixelUnpackState &unpack, const void *pixel
// In order to perform the fast copy through the shader, we must have the right format, and be able
// to create a render target.
if
(
IsFastCopyBufferToTextureSupported
(
sizedInternalFormat
,
mRenderer
->
getCurrentClientVersion
()
))
if
(
mRenderer
->
supportsFastCopyBufferToTexture
(
sizedInternalFormat
))
{
unsigned
int
offset
=
reinterpret_cast
<
unsigned
int
>
(
pixels
);
rx
::
RenderTarget
*
destRenderTarget
=
getStorage
(
true
)
->
getStorageInstance
()
->
getRenderTarget
(
level
);
...
...
src/libGLESv2/formatutils.cpp
View file @
0e0510fd
...
...
@@ -1590,9 +1590,4 @@ ColorWriteFunction GetColorWriteFunction(GLenum format, GLenum type, GLuint clie
return
(
iter
!=
formats
.
end
())
?
iter
->
second
.
mColorWriteFunction
:
NULL
;
}
bool
IsFastCopyBufferToTextureSupported
(
GLint
internalFormat
,
GLuint
clientVersion
)
{
return
false
;
}
}
src/libGLESv2/formatutils.h
View file @
0e0510fd
...
...
@@ -88,8 +88,6 @@ GLuint GetCompressedBlockHeight(GLint internalFormat, GLuint clientVersion);
ColorWriteFunction
GetColorWriteFunction
(
GLenum
format
,
GLenum
type
,
GLuint
clientVersion
);
bool
IsFastCopyBufferToTextureSupported
(
GLint
internalFormat
,
GLuint
clientVersion
);
}
#endif LIBGLESV2_FORMATUTILS_H_
src/libGLESv2/renderer/Renderer.h
View file @
0e0510fd
...
...
@@ -260,6 +260,7 @@ class Renderer
int
getCurrentClientVersion
()
const
{
return
mCurrentClientVersion
;
}
// Buffer-to-texture and Texture-to-buffer copies
virtual
bool
supportsFastCopyBufferToTexture
(
GLint
internalFormat
)
const
=
0
;
virtual
bool
fastCopyBufferToTexture
(
const
gl
::
PixelUnpackState
&
unpack
,
unsigned
int
offset
,
RenderTarget
*
destRenderTarget
,
GLenum
destinationFormat
,
GLenum
sourcePixelsType
,
const
gl
::
Box
&
destArea
)
=
0
;
...
...
src/libGLESv2/renderer/d3d11/PixelTransfer11.cpp
View file @
0e0510fd
...
...
@@ -152,7 +152,7 @@ bool PixelTransfer11::copyBufferToTexture(const gl::PixelUnpackState &unpack, un
int
clientVersion
=
mRenderer
->
getCurrentClientVersion
();
const
gl
::
Buffer
&
sourceBuffer
=
*
unpack
.
pixelBuffer
.
get
();
ASSERT
(
gl
::
IsFastCopyBufferToTextureSupported
(
destinationFormat
,
clientVersion
));
ASSERT
(
mRenderer
->
supportsFastCopyBufferToTexture
(
destinationFormat
));
ID3D11PixelShader
*
pixelShader
=
findBufferToTexturePS
(
destinationFormat
);
ASSERT
(
pixelShader
);
...
...
src/libGLESv2/renderer/d3d11/Renderer11.cpp
View file @
0e0510fd
...
...
@@ -2767,10 +2767,16 @@ FenceImpl *Renderer11::createFence()
return
new
Fence11
(
this
);
}
bool
Renderer11
::
supportsFastCopyBufferToTexture
(
GLint
internalFormat
)
const
{
//TODO
return
false
;
}
bool
Renderer11
::
fastCopyBufferToTexture
(
const
gl
::
PixelUnpackState
&
unpack
,
unsigned
int
offset
,
RenderTarget
*
destRenderTarget
,
GLenum
destinationFormat
,
GLenum
sourcePixelsType
,
const
gl
::
Box
&
destArea
)
{
ASSERT
(
gl
::
IsFastCopyBufferToTextureSupported
(
destinationFormat
,
getCurrentClientVersion
()
));
ASSERT
(
supportsFastCopyBufferToTexture
(
destinationFormat
));
return
mPixelTransfer
->
copyBufferToTexture
(
unpack
,
offset
,
destRenderTarget
,
destinationFormat
,
sourcePixelsType
,
destArea
);
}
...
...
src/libGLESv2/renderer/d3d11/Renderer11.h
View file @
0e0510fd
...
...
@@ -208,6 +208,7 @@ class Renderer11 : public Renderer
Blit11
*
getBlitter
()
{
return
mBlit
;
}
// Buffer-to-texture and Texture-to-buffer copies
virtual
bool
supportsFastCopyBufferToTexture
(
GLint
internalFormat
)
const
;
virtual
bool
fastCopyBufferToTexture
(
const
gl
::
PixelUnpackState
&
unpack
,
unsigned
int
offset
,
RenderTarget
*
destRenderTarget
,
GLenum
destinationFormat
,
GLenum
sourcePixelsType
,
const
gl
::
Box
&
destArea
);
...
...
src/libGLESv2/renderer/d3d9/Renderer9.cpp
View file @
0e0510fd
...
...
@@ -723,6 +723,12 @@ FenceImpl *Renderer9::createFence()
return
new
Fence9
(
this
);
}
bool
Renderer9
::
supportsFastCopyBufferToTexture
(
GLint
internalFormat
)
const
{
// Pixel buffer objects are not supported in D3D9, since D3D9 is ES2-only and PBOs are ES3.
return
false
;
}
bool
Renderer9
::
fastCopyBufferToTexture
(
const
gl
::
PixelUnpackState
&
unpack
,
unsigned
int
offset
,
RenderTarget
*
destRenderTarget
,
GLenum
destinationFormat
,
GLenum
sourcePixelsType
,
const
gl
::
Box
&
destArea
)
{
...
...
src/libGLESv2/renderer/d3d9/Renderer9.h
View file @
0e0510fd
...
...
@@ -217,6 +217,7 @@ class Renderer9 : public Renderer
virtual
FenceImpl
*
createFence
();
// Buffer-to-texture and Texture-to-buffer copies
virtual
bool
supportsFastCopyBufferToTexture
(
GLint
internalFormat
)
const
;
virtual
bool
fastCopyBufferToTexture
(
const
gl
::
PixelUnpackState
&
unpack
,
unsigned
int
offset
,
RenderTarget
*
destRenderTarget
,
GLenum
destinationFormat
,
GLenum
sourcePixelsType
,
const
gl
::
Box
&
destArea
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment