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
a21eea36
Commit
a21eea36
authored
Sep 18, 2013
by
Jamie Madill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pixel unpack buffer stubs to the Renderer classes.
TRAC #23841 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods
parent
89a0bf50
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
0 deletions
+35
-0
Renderer.h
src/libGLESv2/renderer/Renderer.h
+4
-0
Renderer11.cpp
src/libGLESv2/renderer/Renderer11.cpp
+13
-0
Renderer11.h
src/libGLESv2/renderer/Renderer11.h
+6
-0
Renderer9.cpp
src/libGLESv2/renderer/Renderer9.cpp
+8
-0
Renderer9.h
src/libGLESv2/renderer/Renderer9.h
+4
-0
No files found.
src/libGLESv2/renderer/Renderer.h
View file @
a21eea36
...
@@ -259,6 +259,10 @@ class Renderer
...
@@ -259,6 +259,10 @@ class Renderer
void
setCurrentClientVersion
(
int
clientVersion
)
{
mCurrentClientVersion
=
clientVersion
;
}
void
setCurrentClientVersion
(
int
clientVersion
)
{
mCurrentClientVersion
=
clientVersion
;
}
int
getCurrentClientVersion
()
const
{
return
mCurrentClientVersion
;
}
int
getCurrentClientVersion
()
const
{
return
mCurrentClientVersion
;
}
// Buffer-to-texture and Texture-to-buffer copies
virtual
bool
fastCopyBufferToTexture
(
const
gl
::
PixelUnpackState
&
unpack
,
unsigned
int
offset
,
RenderTarget
*
destRenderTarget
,
GLenum
destinationFormat
,
GLenum
sourcePixelsType
,
const
gl
::
Box
&
destArea
)
=
0
;
virtual
bool
getLUID
(
LUID
*
adapterLuid
)
const
=
0
;
virtual
bool
getLUID
(
LUID
*
adapterLuid
)
const
=
0
;
protected
:
protected
:
...
...
src/libGLESv2/renderer/Renderer11.cpp
View file @
a21eea36
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "libGLESv2/renderer/Fence11.h"
#include "libGLESv2/renderer/Fence11.h"
#include "libGLESv2/renderer/Blit11.h"
#include "libGLESv2/renderer/Blit11.h"
#include "libGLESv2/renderer/Clear11.h"
#include "libGLESv2/renderer/Clear11.h"
#include "libGLESv2/renderer/PixelTransfer11.h"
#include "libEGL/Display.h"
#include "libEGL/Display.h"
...
@@ -68,6 +69,7 @@ Renderer11::Renderer11(egl::Display *display, HDC hDc) : Renderer(display), mDc(
...
@@ -68,6 +69,7 @@ Renderer11::Renderer11(egl::Display *display, HDC hDc) : Renderer(display), mDc(
mTriangleFanIB
=
NULL
;
mTriangleFanIB
=
NULL
;
mBlit
=
NULL
;
mBlit
=
NULL
;
mPixelTransfer
=
NULL
;
mClear
=
NULL
;
mClear
=
NULL
;
...
@@ -391,6 +393,9 @@ void Renderer11::initializeDevice()
...
@@ -391,6 +393,9 @@ void Renderer11::initializeDevice()
ASSERT
(
!
mClear
);
ASSERT
(
!
mClear
);
mClear
=
new
Clear11
(
this
);
mClear
=
new
Clear11
(
this
);
ASSERT
(
!
mPixelTransfer
);
mPixelTransfer
=
new
PixelTransfer11
(
this
);
markAllStateDirty
();
markAllStateDirty
();
}
}
...
@@ -1615,6 +1620,7 @@ void Renderer11::releaseDeviceResources()
...
@@ -1615,6 +1620,7 @@ void Renderer11::releaseDeviceResources()
SafeDelete
(
mTriangleFanIB
);
SafeDelete
(
mTriangleFanIB
);
SafeDelete
(
mBlit
);
SafeDelete
(
mBlit
);
SafeDelete
(
mClear
);
SafeDelete
(
mClear
);
SafeDelete
(
mPixelTransfer
);
SafeRelease
(
mDriverConstantBufferVS
);
SafeRelease
(
mDriverConstantBufferVS
);
SafeRelease
(
mDriverConstantBufferPS
);
SafeRelease
(
mDriverConstantBufferPS
);
...
@@ -2768,6 +2774,13 @@ FenceImpl *Renderer11::createFence()
...
@@ -2768,6 +2774,13 @@ FenceImpl *Renderer11::createFence()
return
new
Fence11
(
this
);
return
new
Fence11
(
this
);
}
}
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
()));
return
mPixelTransfer
->
copyBufferToTexture
(
unpack
,
offset
,
destRenderTarget
,
destinationFormat
,
sourcePixelsType
,
destArea
);
}
bool
Renderer11
::
getRenderTargetResource
(
gl
::
Renderbuffer
*
colorbuffer
,
unsigned
int
*
subresourceIndex
,
ID3D11Texture2D
**
resource
)
bool
Renderer11
::
getRenderTargetResource
(
gl
::
Renderbuffer
*
colorbuffer
,
unsigned
int
*
subresourceIndex
,
ID3D11Texture2D
**
resource
)
{
{
ASSERT
(
colorbuffer
!=
NULL
);
ASSERT
(
colorbuffer
!=
NULL
);
...
...
src/libGLESv2/renderer/Renderer11.h
View file @
a21eea36
...
@@ -31,6 +31,7 @@ class IndexDataManager;
...
@@ -31,6 +31,7 @@ class IndexDataManager;
class
StreamingIndexBufferInterface
;
class
StreamingIndexBufferInterface
;
class
Blit11
;
class
Blit11
;
class
Clear11
;
class
Clear11
;
class
PixelTransfer11
;
enum
enum
{
{
...
@@ -206,6 +207,10 @@ class Renderer11 : public Renderer
...
@@ -206,6 +207,10 @@ class Renderer11 : public Renderer
Blit11
*
getBlitter
()
{
return
mBlit
;
}
Blit11
*
getBlitter
()
{
return
mBlit
;
}
// Buffer-to-texture and Texture-to-buffer copies
virtual
bool
fastCopyBufferToTexture
(
const
gl
::
PixelUnpackState
&
unpack
,
unsigned
int
offset
,
RenderTarget
*
destRenderTarget
,
GLenum
destinationFormat
,
GLenum
sourcePixelsType
,
const
gl
::
Box
&
destArea
);
bool
getRenderTargetResource
(
gl
::
Renderbuffer
*
colorbuffer
,
unsigned
int
*
subresourceIndex
,
ID3D11Texture2D
**
resource
);
bool
getRenderTargetResource
(
gl
::
Renderbuffer
*
colorbuffer
,
unsigned
int
*
subresourceIndex
,
ID3D11Texture2D
**
resource
);
void
unapplyRenderTargets
();
void
unapplyRenderTargets
();
void
setOneTimeRenderTarget
(
ID3D11RenderTargetView
*
renderTargetView
);
void
setOneTimeRenderTarget
(
ID3D11RenderTargetView
*
renderTargetView
);
...
@@ -352,6 +357,7 @@ class Renderer11 : public Renderer
...
@@ -352,6 +357,7 @@ class Renderer11 : public Renderer
// Texture copy resources
// Texture copy resources
Blit11
*
mBlit
;
Blit11
*
mBlit
;
PixelTransfer11
*
mPixelTransfer
;
// Masked clear resources
// Masked clear resources
Clear11
*
mClear
;
Clear11
*
mClear
;
...
...
src/libGLESv2/renderer/Renderer9.cpp
View file @
a21eea36
...
@@ -693,6 +693,14 @@ FenceImpl *Renderer9::createFence()
...
@@ -693,6 +693,14 @@ FenceImpl *Renderer9::createFence()
return
new
Fence9
(
this
);
return
new
Fence9
(
this
);
}
}
bool
Renderer9
::
fastCopyBufferToTexture
(
const
gl
::
PixelUnpackState
&
unpack
,
unsigned
int
offset
,
RenderTarget
*
destRenderTarget
,
GLenum
destinationFormat
,
GLenum
sourcePixelsType
,
const
gl
::
Box
&
destArea
)
{
// Pixel buffer objects are not supported in D3D9, since D3D9 is ES2-only and PBOs are ES3.
UNREACHABLE
();
return
false
;
}
void
Renderer9
::
setSamplerState
(
gl
::
SamplerType
type
,
int
index
,
const
gl
::
SamplerState
&
samplerState
)
void
Renderer9
::
setSamplerState
(
gl
::
SamplerType
type
,
int
index
,
const
gl
::
SamplerState
&
samplerState
)
{
{
bool
*
forceSetSamplers
=
(
type
==
gl
::
SAMPLER_PIXEL
)
?
mForceSetPixelSamplerStates
:
mForceSetVertexSamplerStates
;
bool
*
forceSetSamplers
=
(
type
==
gl
::
SAMPLER_PIXEL
)
?
mForceSetPixelSamplerStates
:
mForceSetVertexSamplerStates
;
...
...
src/libGLESv2/renderer/Renderer9.h
View file @
a21eea36
...
@@ -216,6 +216,10 @@ class Renderer9 : public Renderer
...
@@ -216,6 +216,10 @@ class Renderer9 : public Renderer
virtual
QueryImpl
*
createQuery
(
GLenum
type
);
virtual
QueryImpl
*
createQuery
(
GLenum
type
);
virtual
FenceImpl
*
createFence
();
virtual
FenceImpl
*
createFence
();
// Buffer-to-texture and Texture-to-buffer copies
virtual
bool
fastCopyBufferToTexture
(
const
gl
::
PixelUnpackState
&
unpack
,
unsigned
int
offset
,
RenderTarget
*
destRenderTarget
,
GLenum
destinationFormat
,
GLenum
sourcePixelsType
,
const
gl
::
Box
&
destArea
);
// D3D9-renderer specific methods
// D3D9-renderer specific methods
bool
boxFilter
(
IDirect3DSurface9
*
source
,
IDirect3DSurface9
*
dest
);
bool
boxFilter
(
IDirect3DSurface9
*
source
,
IDirect3DSurface9
*
dest
);
...
...
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