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
d42cf4ed
Commit
d42cf4ed
authored
Jun 05, 2013
by
Geoff Lang
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
D3D9 will now use D3DFMT_R5G6B5 textures when GL_RGB565 is requested if the device supports it.
TRAC #23279 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Geoff Lang
parent
42b8b908
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
1 deletion
+20
-1
Renderer.h
src/libGLESv2/renderer/Renderer.h
+1
-0
Renderer11.cpp
src/libGLESv2/renderer/Renderer11.cpp
+5
-0
Renderer11.h
src/libGLESv2/renderer/Renderer11.h
+1
-0
Renderer9.cpp
src/libGLESv2/renderer/Renderer9.cpp
+9
-0
Renderer9.h
src/libGLESv2/renderer/Renderer9.h
+3
-0
formatutils9.cpp
src/libGLESv2/renderer/formatutils9.cpp
+1
-1
No files found.
src/libGLESv2/renderer/Renderer.h
View file @
d42cf4ed
...
@@ -163,6 +163,7 @@ class Renderer
...
@@ -163,6 +163,7 @@ class Renderer
virtual
bool
getFloat16TextureSupport
()
const
=
0
;
virtual
bool
getFloat16TextureSupport
()
const
=
0
;
virtual
bool
getFloat16TextureFilteringSupport
()
const
=
0
;
virtual
bool
getFloat16TextureFilteringSupport
()
const
=
0
;
virtual
bool
getFloat16TextureRenderingSupport
()
const
=
0
;
virtual
bool
getFloat16TextureRenderingSupport
()
const
=
0
;
virtual
bool
getRGB565TextureSupport
()
const
=
0
;
virtual
bool
getLuminanceTextureSupport
()
const
=
0
;
virtual
bool
getLuminanceTextureSupport
()
const
=
0
;
virtual
bool
getLuminanceAlphaTextureSupport
()
const
=
0
;
virtual
bool
getLuminanceAlphaTextureSupport
()
const
=
0
;
bool
getVertexTextureSupport
()
const
{
return
getMaxVertexTextureImageUnits
()
>
0
;
}
bool
getVertexTextureSupport
()
const
{
return
getMaxVertexTextureImageUnits
()
>
0
;
}
...
...
src/libGLESv2/renderer/Renderer11.cpp
View file @
d42cf4ed
...
@@ -2110,6 +2110,11 @@ bool Renderer11::getFloat16TextureRenderingSupport() const
...
@@ -2110,6 +2110,11 @@ bool Renderer11::getFloat16TextureRenderingSupport() const
return
mFloat16RenderSupport
;
return
mFloat16RenderSupport
;
}
}
bool
Renderer11
::
getRGB565TextureSupport
()
const
{
return
false
;
}
bool
Renderer11
::
getLuminanceTextureSupport
()
const
bool
Renderer11
::
getLuminanceTextureSupport
()
const
{
{
return
false
;
return
false
;
...
...
src/libGLESv2/renderer/Renderer11.h
View file @
d42cf4ed
...
@@ -105,6 +105,7 @@ class Renderer11 : public Renderer
...
@@ -105,6 +105,7 @@ class Renderer11 : public Renderer
virtual
bool
getFloat16TextureSupport
()
const
;
virtual
bool
getFloat16TextureSupport
()
const
;
virtual
bool
getFloat16TextureFilteringSupport
()
const
;
virtual
bool
getFloat16TextureFilteringSupport
()
const
;
virtual
bool
getFloat16TextureRenderingSupport
()
const
;
virtual
bool
getFloat16TextureRenderingSupport
()
const
;
virtual
bool
getRGB565TextureSupport
()
const
;
virtual
bool
getLuminanceTextureSupport
()
const
;
virtual
bool
getLuminanceTextureSupport
()
const
;
virtual
bool
getLuminanceAlphaTextureSupport
()
const
;
virtual
bool
getLuminanceAlphaTextureSupport
()
const
;
virtual
unsigned
int
getMaxVertexTextureImageUnits
()
const
;
virtual
unsigned
int
getMaxVertexTextureImageUnits
()
const
;
...
...
src/libGLESv2/renderer/Renderer9.cpp
View file @
d42cf4ed
...
@@ -380,6 +380,10 @@ EGLint Renderer9::initialize()
...
@@ -380,6 +380,10 @@ EGLint Renderer9::initialize()
SUCCEEDED
(
mD3d9
->
CheckDeviceFormat
(
mAdapter
,
mDeviceType
,
currentDisplayMode
.
Format
,
SUCCEEDED
(
mD3d9
->
CheckDeviceFormat
(
mAdapter
,
mDeviceType
,
currentDisplayMode
.
Format
,
D3DUSAGE_QUERY_VERTEXTEXTURE
,
D3DRTYPE_TEXTURE
,
D3DFMT_R16F
));
D3DUSAGE_QUERY_VERTEXTEXTURE
,
D3DRTYPE_TEXTURE
,
D3DFMT_R16F
));
// Check RGB565 texture support
mRGB565TextureSupport
=
SUCCEEDED
(
mD3d9
->
CheckDeviceFormat
(
mAdapter
,
mDeviceType
,
currentDisplayMode
.
Format
,
D3DUSAGE_RENDERTARGET
,
D3DRTYPE_TEXTURE
,
D3DFMT_R5G6B5
));
// Check depth texture support
// Check depth texture support
// we use INTZ for depth textures in Direct3D9
// we use INTZ for depth textures in Direct3D9
// we also want NULL texture support to ensure the we can make depth-only FBOs
// we also want NULL texture support to ensure the we can make depth-only FBOs
...
@@ -2243,6 +2247,11 @@ bool Renderer9::getFloat16TextureRenderingSupport() const
...
@@ -2243,6 +2247,11 @@ bool Renderer9::getFloat16TextureRenderingSupport() const
return
mFloat16RenderSupport
;
return
mFloat16RenderSupport
;
}
}
bool
Renderer9
::
getRGB565TextureSupport
()
const
{
return
mRGB565TextureSupport
;
}
bool
Renderer9
::
getLuminanceTextureSupport
()
const
bool
Renderer9
::
getLuminanceTextureSupport
()
const
{
{
return
mLuminanceTextureSupport
;
return
mLuminanceTextureSupport
;
...
...
src/libGLESv2/renderer/Renderer9.h
View file @
d42cf4ed
...
@@ -120,6 +120,7 @@ class Renderer9 : public Renderer
...
@@ -120,6 +120,7 @@ class Renderer9 : public Renderer
virtual
bool
getFloat16TextureSupport
()
const
;
virtual
bool
getFloat16TextureSupport
()
const
;
virtual
bool
getFloat16TextureFilteringSupport
()
const
;
virtual
bool
getFloat16TextureFilteringSupport
()
const
;
virtual
bool
getFloat16TextureRenderingSupport
()
const
;
virtual
bool
getFloat16TextureRenderingSupport
()
const
;
virtual
bool
getRGB565TextureSupport
()
const
;
virtual
bool
getLuminanceTextureSupport
()
const
;
virtual
bool
getLuminanceTextureSupport
()
const
;
virtual
bool
getLuminanceAlphaTextureSupport
()
const
;
virtual
bool
getLuminanceAlphaTextureSupport
()
const
;
virtual
unsigned
int
getMaxVertexTextureImageUnits
()
const
;
virtual
unsigned
int
getMaxVertexTextureImageUnits
()
const
;
...
@@ -272,6 +273,8 @@ class Renderer9 : public Renderer
...
@@ -272,6 +273,8 @@ class Renderer9 : public Renderer
bool
mDepthTextureSupport
;
bool
mDepthTextureSupport
;
bool
mRGB565TextureSupport
;
bool
mFloat32TextureSupport
;
bool
mFloat32TextureSupport
;
bool
mFloat32FilterSupport
;
bool
mFloat32FilterSupport
;
bool
mFloat32RenderSupport
;
bool
mFloat32RenderSupport
;
...
...
src/libGLESv2/renderer/formatutils9.cpp
View file @
d42cf4ed
...
@@ -112,7 +112,7 @@ static D3D9FormatMap BuildD3D9FormatMap()
...
@@ -112,7 +112,7 @@ static D3D9FormatMap BuildD3D9FormatMap()
map
.
insert
(
D3D9FormatPair
(
GL_ALPHA8_EXT
,
D3D9FormatInfo
(
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
FallbackLoadFunction
<
gl
::
supportsSSE2
,
loadAlphaDataToBGRASSE2
,
loadAlphaDataToBGRA
>
)));
map
.
insert
(
D3D9FormatPair
(
GL_ALPHA8_EXT
,
D3D9FormatInfo
(
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
FallbackLoadFunction
<
gl
::
supportsSSE2
,
loadAlphaDataToBGRASSE2
,
loadAlphaDataToBGRA
>
)));
map
.
insert
(
D3D9FormatPair
(
GL_RGB8_OES
,
D3D9FormatInfo
(
D3D9Format
<
D3DFMT_X8R8G8B8
>
,
D3D9Format
<
D3DFMT_X8R8G8B8
>
,
SimpleLoad
<
loadRGBUByteDataToBGRX
>
)));
map
.
insert
(
D3D9FormatPair
(
GL_RGB8_OES
,
D3D9FormatInfo
(
D3D9Format
<
D3DFMT_X8R8G8B8
>
,
D3D9Format
<
D3DFMT_X8R8G8B8
>
,
SimpleLoad
<
loadRGBUByteDataToBGRX
>
)));
map
.
insert
(
D3D9FormatPair
(
GL_RGB565
,
D3D9FormatInfo
(
D3D9Format
<
D3DFMT_X8R8G8B8
>
,
D3D9Format
<
D3DFMT_R5G6B5
>
,
SimpleLoad
<
loadRGB565DataToBGRA
>
)));
map
.
insert
(
D3D9FormatPair
(
GL_RGB565
,
D3D9FormatInfo
(
CheckFormatSupport
<&
Renderer9
::
getRGB565TextureSupport
,
D3DFMT_R5G6B5
,
D3DFMT_X8R8G8B8
>
,
CheckFormatSupport
<&
Renderer9
::
getRGB565TextureSupport
,
D3DFMT_R5G6B5
,
D3DFMT_X8R8G8B8
>
,
RendererCheckLoad
<&
Renderer9
::
getRGB565TextureSupport
,
loadToNative
<
GLushort
,
1
>
,
loadRGB565DataToBGRA
>
)));
map
.
insert
(
D3D9FormatPair
(
GL_RGBA8_OES
,
D3D9FormatInfo
(
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
FallbackLoadFunction
<
gl
::
supportsSSE2
,
loadRGBAUByteDataToBGRASSE2
,
loadRGBAUByteDataToBGRA
>
)));
map
.
insert
(
D3D9FormatPair
(
GL_RGBA8_OES
,
D3D9FormatInfo
(
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
FallbackLoadFunction
<
gl
::
supportsSSE2
,
loadRGBAUByteDataToBGRASSE2
,
loadRGBAUByteDataToBGRA
>
)));
map
.
insert
(
D3D9FormatPair
(
GL_RGBA4
,
D3D9FormatInfo
(
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
SimpleLoad
<
loadRGBA4444DataToBGRA
>
)));
map
.
insert
(
D3D9FormatPair
(
GL_RGBA4
,
D3D9FormatInfo
(
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
SimpleLoad
<
loadRGBA4444DataToBGRA
>
)));
map
.
insert
(
D3D9FormatPair
(
GL_RGB5_A1
,
D3D9FormatInfo
(
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
SimpleLoad
<
loadRGBA5551DataToBGRA
>
)));
map
.
insert
(
D3D9FormatPair
(
GL_RGB5_A1
,
D3D9FormatInfo
(
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
D3D9Format
<
D3DFMT_A8R8G8B8
>
,
SimpleLoad
<
loadRGBA5551DataToBGRA
>
)));
...
...
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