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
10422f3c
There was an error fetching the commit references. Please try again later.
Commit
10422f3c
authored
6 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
gl_rasterizer: Workaround for when exceeding max UBO size.
parent
dfac394e
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_rasterizer.cpp
+6
-0
6 additions, 0 deletions
src/video_core/renderer_opengl/gl_rasterizer.cpp
src/video_core/renderer_opengl/gl_rasterizer.h
+1
-1
1 addition, 1 deletion
src/video_core/renderer_opengl/gl_rasterizer.h
with
7 additions
and
1 deletion
src/video_core/renderer_opengl/gl_rasterizer.cpp
+
6
−
0
View file @
10422f3c
...
...
@@ -613,6 +613,12 @@ u32 RasterizerOpenGL::SetupConstBuffers(Maxwell::ShaderStage stage, GLuint progr
if
(
used_buffer
.
IsIndirect
())
{
// Buffer is accessed indirectly, so upload the entire thing
size
=
buffer
.
size
*
sizeof
(
float
);
if
(
size
>
MaxConstbufferSize
)
{
NGLOG_ERROR
(
HW_GPU
,
"indirect constbuffer size {} exceeds maximum {}"
,
size
,
MaxConstbufferSize
);
size
=
MaxConstbufferSize
;
}
}
else
{
// Buffer is accessed directly, upload just what we use
size
=
used_buffer
.
GetSize
()
*
sizeof
(
float
);
...
...
This diff is collapsed.
Click to expand it.
src/video_core/renderer_opengl/gl_rasterizer.h
+
1
−
1
View file @
10422f3c
...
...
@@ -55,7 +55,7 @@ public:
};
/// Maximum supported size that a constbuffer can have in bytes.
static
constexpr
size_t
MaxConstbufferSize
=
0x1000
;
static
constexpr
size_t
MaxConstbufferSize
=
0x1000
0
;
static_assert
(
MaxConstbufferSize
%
sizeof
(
GLvec4
)
==
0
,
"The maximum size of a constbuffer must be a multiple of the size of GLvec4"
);
...
...
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