Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
d480b63e
There was an error fetching the commit references. Please try again later.
Commit
d480b63e
authored
6 years ago
by
Subv
Browse files
Options
Downloads
Patches
Plain Diff
MaxwellToGL: Added conversion functions for depth test and cull mode.
parent
c1f55c32
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/video_core/renderer_opengl/maxwell_to_gl.h
+50
-0
50 additions, 0 deletions
src/video_core/renderer_opengl/maxwell_to_gl.h
with
50 additions
and
0 deletions
src/video_core/renderer_opengl/maxwell_to_gl.h
+
50
−
0
View file @
d480b63e
...
@@ -201,4 +201,54 @@ inline GLenum SwizzleSource(Tegra::Texture::SwizzleSource source) {
...
@@ -201,4 +201,54 @@ inline GLenum SwizzleSource(Tegra::Texture::SwizzleSource source) {
return
{};
return
{};
}
}
inline
GLenum
ComparisonOp
(
Maxwell
::
ComparisonOp
comparison
)
{
switch
(
comparison
)
{
case
Maxwell
::
ComparisonOp
::
Never
:
return
GL_NEVER
;
case
Maxwell
::
ComparisonOp
::
Less
:
return
GL_LESS
;
case
Maxwell
::
ComparisonOp
::
Equal
:
return
GL_EQUAL
;
case
Maxwell
::
ComparisonOp
::
LessEqual
:
return
GL_LEQUAL
;
case
Maxwell
::
ComparisonOp
::
Greater
:
return
GL_GREATER
;
case
Maxwell
::
ComparisonOp
::
NotEqual
:
return
GL_NOTEQUAL
;
case
Maxwell
::
ComparisonOp
::
GreaterEqual
:
return
GL_GEQUAL
;
case
Maxwell
::
ComparisonOp
::
Always
:
return
GL_ALWAYS
;
}
NGLOG_CRITICAL
(
Render_OpenGL
,
"Unimplemented comparison op={}"
,
static_cast
<
u32
>
(
comparison
));
UNREACHABLE
();
return
{};
}
inline
GLenum
FrontFace
(
Maxwell
::
Cull
::
FrontFace
front_face
)
{
switch
(
front_face
)
{
case
Maxwell
::
Cull
::
FrontFace
::
ClockWise
:
return
GL_CW
;
case
Maxwell
::
Cull
::
FrontFace
::
CounterClockWise
:
return
GL_CCW
;
}
NGLOG_CRITICAL
(
Render_OpenGL
,
"Unimplemented front face cull={}"
,
static_cast
<
u32
>
(
front_face
));
UNREACHABLE
();
return
{};
}
inline
GLenum
CullFace
(
Maxwell
::
Cull
::
CullFace
cull_face
)
{
switch
(
cull_face
)
{
case
Maxwell
::
Cull
::
CullFace
::
Front
:
return
GL_FRONT
;
case
Maxwell
::
Cull
::
CullFace
::
Back
:
return
GL_BACK
;
case
Maxwell
::
Cull
::
CullFace
::
FrontAndBack
:
return
GL_FRONT_AND_BACK
;
}
NGLOG_CRITICAL
(
Render_OpenGL
,
"Unimplemented cull face={}"
,
static_cast
<
u32
>
(
cull_face
));
UNREACHABLE
();
return
{};
}
}
// namespace MaxwellToGL
}
// namespace MaxwellToGL
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment