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
5edf24b5
There was an error fetching the commit references. Please try again later.
Commit
5edf24b5
authored
5 years ago
by
ReinUsesLisp
Browse files
Options
Downloads
Patches
Plain Diff
gl_state: Add support for glBindImageTextures
parent
2424eefa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/video_core/renderer_opengl/gl_state.cpp
+21
-0
21 additions, 0 deletions
src/video_core/renderer_opengl/gl_state.cpp
src/video_core/renderer_opengl/gl_state.h
+3
-0
3 additions, 0 deletions
src/video_core/renderer_opengl/gl_state.h
with
24 additions
and
0 deletions
src/video_core/renderer_opengl/gl_state.cpp
+
21
−
0
View file @
5edf24b5
...
...
@@ -545,6 +545,26 @@ void OpenGLState::ApplySamplers() const {
}
}
void
OpenGLState
::
ApplyImages
()
const
{
bool
has_delta
{};
std
::
size_t
first
{};
std
::
size_t
last
{};
for
(
std
::
size_t
i
=
0
;
i
<
std
::
size
(
images
);
++
i
)
{
if
(
!
UpdateValue
(
cur_state
.
images
[
i
],
images
[
i
]))
{
continue
;
}
if
(
!
has_delta
)
{
first
=
i
;
has_delta
=
true
;
}
last
=
i
;
}
if
(
has_delta
)
{
glBindImageTextures
(
static_cast
<
GLuint
>
(
first
),
static_cast
<
GLsizei
>
(
last
-
first
+
1
),
images
.
data
()
+
first
);
}
}
void
OpenGLState
::
Apply
()
{
MICROPROFILE_SCOPE
(
OpenGL_State
);
ApplyFramebufferState
();
...
...
@@ -576,6 +596,7 @@ void OpenGLState::Apply() {
ApplyLogicOp
();
ApplyTextures
();
ApplySamplers
();
ApplyImages
();
if
(
dirty
.
polygon_offset
)
{
ApplyPolygonOffset
();
dirty
.
polygon_offset
=
false
;
...
...
This diff is collapsed.
Click to expand it.
src/video_core/renderer_opengl/gl_state.h
+
3
−
0
View file @
5edf24b5
...
...
@@ -134,6 +134,8 @@ public:
};
std
::
array
<
TextureUnit
,
Tegra
::
Engines
::
Maxwell3D
::
Regs
::
NumTextureSamplers
>
texture_units
;
std
::
array
<
GLuint
,
Tegra
::
Engines
::
Maxwell3D
::
Regs
::
NumImages
>
images
{};
struct
{
GLuint
read_framebuffer
;
// GL_READ_FRAMEBUFFER_BINDING
GLuint
draw_framebuffer
;
// GL_DRAW_FRAMEBUFFER_BINDING
...
...
@@ -220,6 +222,7 @@ public:
void
ApplyLogicOp
()
const
;
void
ApplyTextures
()
const
;
void
ApplySamplers
()
const
;
void
ApplyImages
()
const
;
void
ApplyDepthClamp
()
const
;
void
ApplyPolygonOffset
()
const
;
void
ApplyAlphaTest
()
const
;
...
...
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