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
dd4674f2
Commit
dd4674f2
authored
Jul 08, 2013
by
Shannon Woods
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds a function to retrieve the renderable DXGI format for a GL internal format.
TRAC #23273 Authored-by: Shannon Woods Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens
parent
ddb785c2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
Renderer11.cpp
src/libGLESv2/renderer/Renderer11.cpp
+1
-1
formatutils11.cpp
src/libGLESv2/renderer/formatutils11.cpp
+13
-0
formatutils11.h
src/libGLESv2/renderer/formatutils11.h
+1
-0
No files found.
src/libGLESv2/renderer/Renderer11.cpp
View file @
dd4674f2
...
@@ -2451,7 +2451,7 @@ int Renderer11::getMaxSupportedSamples() const
...
@@ -2451,7 +2451,7 @@ int Renderer11::getMaxSupportedSamples() const
GLsizei
Renderer11
::
getMaxSupportedFormatSamples
(
GLint
internalFormat
)
const
GLsizei
Renderer11
::
getMaxSupportedFormatSamples
(
GLint
internalFormat
)
const
{
{
DXGI_FORMAT
format
=
gl_d3d11
::
Get
Tex
Format
(
internalFormat
,
getCurrentClientVersion
());
DXGI_FORMAT
format
=
gl_d3d11
::
Get
Renderable
Format
(
internalFormat
,
getCurrentClientVersion
());
MultisampleSupportMap
::
const_iterator
iter
=
mMultisampleSupportMap
.
find
(
format
);
MultisampleSupportMap
::
const_iterator
iter
=
mMultisampleSupportMap
.
find
(
format
);
return
(
iter
!=
mMultisampleSupportMap
.
end
())
?
iter
->
second
.
maxSupportedSamples
:
0
;
return
(
iter
!=
mMultisampleSupportMap
.
end
())
?
iter
->
second
.
maxSupportedSamples
:
0
;
}
}
...
...
src/libGLESv2/renderer/formatutils11.cpp
View file @
dd4674f2
...
@@ -1011,6 +1011,19 @@ DXGI_FORMAT GetDSVFormat(GLint internalFormat, GLuint clientVersion)
...
@@ -1011,6 +1011,19 @@ DXGI_FORMAT GetDSVFormat(GLint internalFormat, GLuint clientVersion)
}
}
}
}
// Given a GL internal format, this function returns the DSV format if it is depth- or stencil-renderable,
// the RTV format if it is color-renderable, and the (nonrenderable) texture format otherwise.
DXGI_FORMAT
GetRenderableFormat
(
GLint
internalFormat
,
GLuint
clientVersion
)
{
DXGI_FORMAT
targetFormat
=
GetDSVFormat
(
internalFormat
,
clientVersion
);
if
(
targetFormat
==
DXGI_FORMAT_UNKNOWN
)
targetFormat
=
GetRTVFormat
(
internalFormat
,
clientVersion
);
if
(
targetFormat
==
DXGI_FORMAT_UNKNOWN
)
targetFormat
=
GetTexFormat
(
internalFormat
,
clientVersion
);
return
targetFormat
;
}
}
}
namespace
d3d11_gl
namespace
d3d11_gl
...
...
src/libGLESv2/renderer/formatutils11.h
View file @
dd4674f2
...
@@ -48,6 +48,7 @@ DXGI_FORMAT GetTexFormat(GLint internalFormat, GLuint clientVersion);
...
@@ -48,6 +48,7 @@ DXGI_FORMAT GetTexFormat(GLint internalFormat, GLuint clientVersion);
DXGI_FORMAT
GetSRVFormat
(
GLint
internalFormat
,
GLuint
clientVersion
);
DXGI_FORMAT
GetSRVFormat
(
GLint
internalFormat
,
GLuint
clientVersion
);
DXGI_FORMAT
GetRTVFormat
(
GLint
internalFormat
,
GLuint
clientVersion
);
DXGI_FORMAT
GetRTVFormat
(
GLint
internalFormat
,
GLuint
clientVersion
);
DXGI_FORMAT
GetDSVFormat
(
GLint
internalFormat
,
GLuint
clientVersion
);
DXGI_FORMAT
GetDSVFormat
(
GLint
internalFormat
,
GLuint
clientVersion
);
DXGI_FORMAT
GetRenderableFormat
(
GLint
internalFormat
,
GLuint
clientVersion
);
}
}
...
...
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