Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
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
glslang
Commits
f4ba9522
Commit
f4ba9522
authored
Nov 15, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL: Increase supported sizes of XBF strides and offsets.
parent
579ccece
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
26 deletions
+30
-26
440.vert.out
Test/baseResults/440.vert.out
+2
-0
Types.h
glslang/Include/Types.h
+21
-21
revision.h
glslang/Include/revision.h
+1
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+6
-4
No files found.
Test/baseResults/440.vert.out
View file @
f4ba9522
...
...
@@ -171,6 +171,8 @@ ERROR: xfb_buffer 0, xfb_stride 92
ERROR: Linking vertex stage: xfb_stride must be multiple of 4:
ERROR: xfb_buffer 5, xfb_stride 6
ERROR: Linking vertex stage: xfb_stride is too large:
ERROR: xfb_buffer 6, components (1/4 stride) needed are 500, gl_MaxTransformFeedbackInterleavedComponents is 64
ERROR: Linking vertex stage: xfb_stride is too large:
ERROR: xfb_buffer 7, components (1/4 stride) needed are 66, gl_MaxTransformFeedbackInterleavedComponents is 64
Shader version: 440
...
...
glslang/Include/Types.h
100644 → 100755
View file @
f4ba9522
...
...
@@ -774,40 +774,40 @@ public:
int
layoutOffset
;
int
layoutAlign
;
unsigned
int
layoutLocation
:
12
;
static
const
unsigned
int
layoutLocationEnd
=
0xFFF
;
unsigned
int
layoutLocation
:
12
;
static
const
unsigned
int
layoutLocationEnd
=
0xFFF
;
unsigned
int
layoutComponent
:
3
;
static
const
unsigned
int
layoutComponentEnd
=
4
;
unsigned
int
layoutComponent
:
3
;
static
const
unsigned
int
layoutComponentEnd
=
4
;
unsigned
int
layoutSet
:
7
;
static
const
unsigned
int
layoutSetEnd
=
0x3F
;
unsigned
int
layoutSet
:
7
;
static
const
unsigned
int
layoutSetEnd
=
0x3F
;
unsigned
int
layoutBinding
:
16
;
static
const
unsigned
int
layoutBindingEnd
=
0xFFFF
;
unsigned
int
layoutBinding
:
16
;
static
const
unsigned
int
layoutBindingEnd
=
0xFFFF
;
unsigned
int
layoutIndex
:
8
;
static
const
unsigned
int
layoutIndexEnd
=
0xFF
;
unsigned
int
layoutIndex
:
8
;
static
const
unsigned
int
layoutIndexEnd
=
0xFF
;
unsigned
int
layoutStream
:
8
;
static
const
unsigned
int
layoutStreamEnd
=
0xFF
;
unsigned
int
layoutStream
:
8
;
static
const
unsigned
int
layoutStreamEnd
=
0xFF
;
unsigned
int
layoutXfbBuffer
:
4
;
static
const
unsigned
int
layoutXfbBufferEnd
=
0xF
;
unsigned
int
layoutXfbBuffer
:
4
;
static
const
unsigned
int
layoutXfbBufferEnd
=
0xF
;
unsigned
int
layoutXfbStride
:
10
;
static
const
unsigned
int
layoutXfbStrideEnd
=
0x3
FF
;
unsigned
int
layoutXfbStride
:
14
;
static
const
unsigned
int
layoutXfbStrideEnd
=
0x3F
FF
;
unsigned
int
layoutXfbOffset
:
10
;
static
const
unsigned
int
layoutXfbOffsetEnd
=
0x3
FF
;
unsigned
int
layoutXfbOffset
:
13
;
static
const
unsigned
int
layoutXfbOffsetEnd
=
0x1F
FF
;
unsigned
int
layoutAttachment
:
8
;
// for input_attachment_index
static
const
unsigned
int
layoutAttachmentEnd
=
0XFF
;
unsigned
int
layoutAttachment
:
8
;
// for input_attachment_index
static
const
unsigned
int
layoutAttachmentEnd
=
0XFF
;
unsigned
int
layoutSpecConstantId
:
11
;
static
const
unsigned
int
layoutSpecConstantIdEnd
=
0x7FF
;
TLayoutFormat
layoutFormat
:
8
;
TLayoutFormat
layoutFormat
:
8
;
bool
layoutPushConstant
;
...
...
glslang/Include/revision.h
View file @
f4ba9522
// This header is generated by the make-revision script.
#define GLSLANG_PATCH_LEVEL 298
4
#define GLSLANG_PATCH_LEVEL 298
8
glslang/MachineIndependent/ParseHelper.cpp
View file @
f4ba9522
...
...
@@ -4936,11 +4936,13 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
}
else
if
(
id
==
"xfb_stride"
)
{
// "The resulting stride (implicit or explicit), when divided by 4, must be less than or equal to the
// implementation-dependent constant gl_MaxTransformFeedbackInterleavedComponents."
if
(
value
>
4
*
resources
.
maxTransformFeedbackInterleavedComponents
)
error
(
loc
,
"1/4 stride is too large:"
,
id
.
c_str
(),
"gl_MaxTransformFeedbackInterleavedComponents is %d"
,
resources
.
maxTransformFeedbackInterleavedComponents
);
else
if
(
value
>=
(
int
)
TQualifier
::
layoutXfbStrideEnd
)
if
(
value
>
4
*
resources
.
maxTransformFeedbackInterleavedComponents
)
{
error
(
loc
,
"1/4 stride is too large:"
,
id
.
c_str
(),
"gl_MaxTransformFeedbackInterleavedComponents is %d"
,
resources
.
maxTransformFeedbackInterleavedComponents
);
}
if
(
value
>=
(
int
)
TQualifier
::
layoutXfbStrideEnd
)
error
(
loc
,
"stride is too large:"
,
id
.
c_str
(),
"internal max is %d"
,
TQualifier
::
layoutXfbStrideEnd
-
1
);
if
(
value
<
(
int
)
TQualifier
::
layoutXfbStrideEnd
)
else
publicType
.
qualifier
.
layoutXfbStride
=
value
;
return
;
}
...
...
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