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
04db3f5a
Commit
04db3f5a
authored
Sep 16, 2015
by
Rex Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues from review comments and those relevant to texelFetch
parent
30f9258d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
26 deletions
+45
-26
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+28
-20
SpvBuilder.h
SPIRV/SpvBuilder.h
+0
-5
disassemble.cpp
SPIRV/disassemble.cpp
+2
-0
intermediate.h
glslang/Include/intermediate.h
+15
-1
No files found.
SPIRV/GlslangToSpv.cpp
View file @
04db3f5a
...
@@ -99,16 +99,16 @@ protected:
...
@@ -99,16 +99,16 @@ protected:
void
makeGlobalInitializers
(
const
glslang
::
TIntermSequence
&
);
void
makeGlobalInitializers
(
const
glslang
::
TIntermSequence
&
);
void
visitFunctions
(
const
glslang
::
TIntermSequence
&
);
void
visitFunctions
(
const
glslang
::
TIntermSequence
&
);
void
handleFunctionEntry
(
const
glslang
::
TIntermAggregate
*
node
);
void
handleFunctionEntry
(
const
glslang
::
TIntermAggregate
*
node
);
void
translateArguments
(
glslang
::
TIntermAggregate
&
node
,
std
::
vector
<
spv
::
Id
>&
arguments
);
void
translateArguments
(
const
glslang
::
TIntermAggregate
&
node
,
std
::
vector
<
spv
::
Id
>&
arguments
);
void
translateArguments
(
glslang
::
TIntermUnary
&
node
,
std
::
vector
<
spv
::
Id
>&
arguments
);
void
translateArguments
(
glslang
::
TIntermUnary
&
node
,
std
::
vector
<
spv
::
Id
>&
arguments
);
spv
::
Id
createImageTextureFunctionCall
(
glslang
::
TIntermOperator
*
node
);
spv
::
Id
createImageTextureFunctionCall
(
glslang
::
TIntermOperator
*
node
);
spv
::
Id
handleUserFunctionCall
(
const
glslang
::
TIntermAggregate
*
);
spv
::
Id
handleUserFunctionCall
(
const
glslang
::
TIntermAggregate
*
);
spv
::
Id
createBinaryOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
spv
::
Id
left
,
spv
::
Id
right
,
glslang
::
TBasicType
typeProxy
,
bool
reduceComparison
=
true
);
spv
::
Id
createBinaryOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
spv
::
Id
left
,
spv
::
Id
right
,
glslang
::
TBasicType
typeProxy
,
bool
reduceComparison
=
true
);
spv
::
Id
createUnaryOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
spv
::
Id
operand
,
bool
isFloat
);
spv
::
Id
createUnaryOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
spv
::
Id
operand
,
glslang
::
TBasicType
typeProxy
);
spv
::
Id
createConversion
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
destTypeId
,
spv
::
Id
operand
);
spv
::
Id
createConversion
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
destTypeId
,
spv
::
Id
operand
);
spv
::
Id
makeSmearedConstant
(
spv
::
Id
constant
,
int
vectorSize
);
spv
::
Id
makeSmearedConstant
(
spv
::
Id
constant
,
int
vectorSize
);
spv
::
Id
createAtomicOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
std
::
vector
<
spv
::
Id
>&
operands
);
spv
::
Id
createAtomicOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
std
::
vector
<
spv
::
Id
>&
operands
,
glslang
::
TBasicType
typeProxy
);
spv
::
Id
createMiscOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
std
::
vector
<
spv
::
Id
>&
operands
,
glslang
::
TBasicType
typeProxy
);
spv
::
Id
createMiscOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
std
::
vector
<
spv
::
Id
>&
operands
,
glslang
::
TBasicType
typeProxy
);
spv
::
Id
createNoArgOperation
(
glslang
::
TOperator
op
);
spv
::
Id
createNoArgOperation
(
glslang
::
TOperator
op
);
spv
::
Id
getSymbolId
(
const
glslang
::
TIntermSymbol
*
node
);
spv
::
Id
getSymbolId
(
const
glslang
::
TIntermSymbol
*
node
);
...
@@ -772,8 +772,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
...
@@ -772,8 +772,7 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI
// if not, then possibly an operation
// if not, then possibly an operation
if
(
!
result
)
if
(
!
result
)
result
=
createUnaryOperation
(
node
->
getOp
(),
precision
,
convertGlslangToSpvType
(
node
->
getType
()),
operand
,
result
=
createUnaryOperation
(
node
->
getOp
(),
precision
,
convertGlslangToSpvType
(
node
->
getType
()),
operand
,
node
->
getBasicType
());
node
->
getBasicType
()
==
glslang
::
EbtFloat
||
node
->
getBasicType
()
==
glslang
::
EbtDouble
);
if
(
result
)
{
if
(
result
)
{
builder
.
clearAccessChain
();
builder
.
clearAccessChain
();
...
@@ -1165,7 +1164,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
...
@@ -1165,7 +1164,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
if
(
atomic
)
{
if
(
atomic
)
{
// Handle all atomics
// Handle all atomics
result
=
createAtomicOperation
(
node
->
getOp
(),
precision
,
convertGlslangToSpvType
(
node
->
getType
()),
operands
);
result
=
createAtomicOperation
(
node
->
getOp
(),
precision
,
convertGlslangToSpvType
(
node
->
getType
()),
operands
,
node
->
getBasicType
()
);
}
else
{
}
else
{
// Pass through to generic operations.
// Pass through to generic operations.
switch
(
glslangOperands
.
size
())
{
switch
(
glslangOperands
.
size
())
{
...
@@ -1173,7 +1172,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
...
@@ -1173,7 +1172,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
result
=
createNoArgOperation
(
node
->
getOp
());
result
=
createNoArgOperation
(
node
->
getOp
());
break
;
break
;
case
1
:
case
1
:
result
=
createUnaryOperation
(
node
->
getOp
(),
precision
,
convertGlslangToSpvType
(
node
->
getType
()),
operands
.
front
(),
node
->
getType
().
getBasicType
()
==
glslang
::
EbtFloat
||
node
->
getType
().
getBasicType
()
==
glslang
::
EbtDouble
);
result
=
createUnaryOperation
(
node
->
getOp
(),
precision
,
convertGlslangToSpvType
(
node
->
getType
()),
operands
.
front
(),
node
->
getType
().
getBasicType
());
break
;
break
;
default
:
default
:
result
=
createMiscOperation
(
node
->
getOp
(),
precision
,
convertGlslangToSpvType
(
node
->
getType
()),
operands
,
node
->
getBasicType
());
result
=
createMiscOperation
(
node
->
getOp
(),
precision
,
convertGlslangToSpvType
(
node
->
getType
()),
operands
,
node
->
getBasicType
());
...
@@ -1735,7 +1734,7 @@ void TGlslangToSpvTraverser::handleFunctionEntry(const glslang::TIntermAggregate
...
@@ -1735,7 +1734,7 @@ void TGlslangToSpvTraverser::handleFunctionEntry(const glslang::TIntermAggregate
builder
.
setBuildPoint
(
functionBlock
);
builder
.
setBuildPoint
(
functionBlock
);
}
}
void
TGlslangToSpvTraverser
::
translateArguments
(
glslang
::
TIntermAggregate
&
node
,
std
::
vector
<
spv
::
Id
>&
arguments
)
void
TGlslangToSpvTraverser
::
translateArguments
(
const
glslang
::
TIntermAggregate
&
node
,
std
::
vector
<
spv
::
Id
>&
arguments
)
{
{
const
glslang
::
TIntermSequence
&
glslangArguments
=
node
.
getSequence
();
const
glslang
::
TIntermSequence
&
glslangArguments
=
node
.
getSequence
();
for
(
int
i
=
0
;
i
<
(
int
)
glslangArguments
.
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
(
int
)
glslangArguments
.
size
();
++
i
)
{
...
@@ -1782,10 +1781,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
...
@@ -1782,10 +1781,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
}
}
// Process a GLSL texturing op (will be SPV image)
// Process a GLSL texturing op (will be SPV image)
glslang
::
TCrackedTextureOp
cracked
;
node
->
crackTexture
(
cracked
);
const
glslang
::
TSampler
sampler
=
node
->
getAsAggregate
()
?
node
->
getAsAggregate
()
->
getSequence
()[
0
]
->
getAsTyped
()
->
getType
().
getSampler
()
const
glslang
::
TSampler
sampler
=
node
->
getAsAggregate
()
?
node
->
getAsAggregate
()
->
getSequence
()[
0
]
->
getAsTyped
()
->
getType
().
getSampler
()
:
node
->
getAsUnaryNode
()
->
getOperand
()
->
getAsTyped
()
->
getType
().
getSampler
();
:
node
->
getAsUnaryNode
()
->
getOperand
()
->
getAsTyped
()
->
getType
().
getSampler
();
std
::
vector
<
spv
::
Id
>
arguments
;
std
::
vector
<
spv
::
Id
>
arguments
;
...
@@ -1798,6 +1793,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
...
@@ -1798,6 +1793,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
spv
::
Builder
::
TextureParameters
params
=
{
};
spv
::
Builder
::
TextureParameters
params
=
{
};
params
.
sampler
=
arguments
[
0
];
params
.
sampler
=
arguments
[
0
];
glslang
::
TCrackedTextureOp
cracked
;
node
->
crackTexture
(
sampler
,
cracked
);
// Check for queries
// Check for queries
if
(
cracked
.
query
)
{
if
(
cracked
.
query
)
{
switch
(
node
->
getOp
())
{
switch
(
node
->
getOp
())
{
...
@@ -1848,7 +1846,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
...
@@ -1848,7 +1846,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
for
(;
opIt
!=
arguments
.
end
();
++
opIt
)
for
(;
opIt
!=
arguments
.
end
();
++
opIt
)
operands
.
push_back
(
*
opIt
);
operands
.
push_back
(
*
opIt
);
return
createAtomicOperation
(
node
->
getOp
(),
precision
,
convertGlslangToSpvType
(
node
->
getType
()),
operands
);
return
createAtomicOperation
(
node
->
getOp
(),
precision
,
convertGlslangToSpvType
(
node
->
getType
()),
operands
,
node
->
getBasicType
()
);
}
}
}
}
...
@@ -1889,6 +1887,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
...
@@ -1889,6 +1887,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
if
(
cracked
.
lod
)
{
if
(
cracked
.
lod
)
{
params
.
lod
=
arguments
[
2
];
params
.
lod
=
arguments
[
2
];
++
extraArgs
;
++
extraArgs
;
}
else
if
(
cracked
.
sample
)
{
params
.
sample
=
arguments
[
2
];
// For MS, sample should be specified
++
extraArgs
;
}
}
if
(
cracked
.
grad
)
{
if
(
cracked
.
grad
)
{
params
.
gradX
=
arguments
[
2
+
extraArgs
];
params
.
gradX
=
arguments
[
2
+
extraArgs
];
...
@@ -2243,10 +2244,11 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv
...
@@ -2243,10 +2244,11 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv
return
0
;
return
0
;
}
}
spv
::
Id
TGlslangToSpvTraverser
::
createUnaryOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
spv
::
Id
operand
,
bool
isFloat
)
spv
::
Id
TGlslangToSpvTraverser
::
createUnaryOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
spv
::
Id
operand
,
glslang
::
TBasicType
typeProxy
)
{
{
spv
::
Op
unaryOp
=
spv
::
OpNop
;
spv
::
Op
unaryOp
=
spv
::
OpNop
;
int
libCall
=
-
1
;
int
libCall
=
-
1
;
bool
isFloat
=
typeProxy
==
glslang
::
EbtFloat
||
typeProxy
==
glslang
::
EbtDouble
;
switch
(
op
)
{
switch
(
op
)
{
case
glslang
:
:
EOpNegative
:
case
glslang
:
:
EOpNegative
:
...
@@ -2462,7 +2464,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv:
...
@@ -2462,7 +2464,7 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv:
// Handle all of the atomics in one place, in createAtomicOperation()
// Handle all of the atomics in one place, in createAtomicOperation()
std
::
vector
<
spv
::
Id
>
operands
;
std
::
vector
<
spv
::
Id
>
operands
;
operands
.
push_back
(
operand
);
operands
.
push_back
(
operand
);
return
createAtomicOperation
(
op
,
precision
,
typeId
,
operands
);
return
createAtomicOperation
(
op
,
precision
,
typeId
,
operands
,
typeProxy
);
}
}
case
glslang
:
:
EOpImageLoad
:
case
glslang
:
:
EOpImageLoad
:
...
@@ -2608,7 +2610,7 @@ spv::Id TGlslangToSpvTraverser::makeSmearedConstant(spv::Id constant, int vector
...
@@ -2608,7 +2610,7 @@ spv::Id TGlslangToSpvTraverser::makeSmearedConstant(spv::Id constant, int vector
}
}
// For glslang ops that map to SPV atomic opCodes
// For glslang ops that map to SPV atomic opCodes
spv
::
Id
TGlslangToSpvTraverser
::
createAtomicOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
std
::
vector
<
spv
::
Id
>&
operands
)
spv
::
Id
TGlslangToSpvTraverser
::
createAtomicOperation
(
glslang
::
TOperator
op
,
spv
::
Decoration
precision
,
spv
::
Id
typeId
,
std
::
vector
<
spv
::
Id
>&
operands
,
glslang
::
TBasicType
typeProxy
)
{
{
spv
::
Op
opCode
=
spv
::
OpNop
;
spv
::
Op
opCode
=
spv
::
OpNop
;
...
@@ -2619,11 +2621,11 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
...
@@ -2619,11 +2621,11 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
break
;
break
;
case
glslang
:
:
EOpAtomicMin
:
case
glslang
:
:
EOpAtomicMin
:
case
glslang
:
:
EOpImageAtomicMin
:
case
glslang
:
:
EOpImageAtomicMin
:
opCode
=
builder
.
isSignedType
(
typeId
)
?
spv
::
OpAtomicUMin
:
spv
::
OpAtomicSMin
;
opCode
=
typeProxy
==
glslang
::
EbtUint
?
spv
::
OpAtomicUMin
:
spv
::
OpAtomicSMin
;
break
;
break
;
case
glslang
:
:
EOpAtomicMax
:
case
glslang
:
:
EOpAtomicMax
:
case
glslang
:
:
EOpImageAtomicMax
:
case
glslang
:
:
EOpImageAtomicMax
:
opCode
=
builder
.
isSignedType
(
typeId
)
?
spv
::
OpAtomicUMax
:
spv
::
OpAtomicSMax
;
opCode
=
typeProxy
==
glslang
::
EbtUint
?
spv
::
OpAtomicUMax
:
spv
::
OpAtomicSMax
;
break
;
break
;
case
glslang
:
:
EOpAtomicAnd
:
case
glslang
:
:
EOpAtomicAnd
:
case
glslang
:
:
EOpImageAtomicAnd
:
case
glslang
:
:
EOpImageAtomicAnd
:
...
@@ -2665,8 +2667,14 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
...
@@ -2665,8 +2667,14 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv
std
::
vector
<
spv
::
Id
>
spvAtomicOperands
;
// hold the spv operands
std
::
vector
<
spv
::
Id
>
spvAtomicOperands
;
// hold the spv operands
auto
opIt
=
operands
.
begin
();
// walk the glslang operands
auto
opIt
=
operands
.
begin
();
// walk the glslang operands
spvAtomicOperands
.
push_back
(
*
(
opIt
++
));
spvAtomicOperands
.
push_back
(
*
(
opIt
++
));
spvAtomicOperands
.
push_back
(
spv
::
ScopeDevice
);
// TBD: what is the correct scope?
spvAtomicOperands
.
push_back
(
spv
::
MemorySemanticsMaskNone
);
// TBD: what are the correct memory semantics?
// Add scope and memory semantics
spvAtomicOperands
.
push_back
(
builder
.
makeUintConstant
(
spv
::
ScopeDevice
));
// TBD: what is the correct scope?
spvAtomicOperands
.
push_back
(
builder
.
makeUintConstant
(
spv
::
MemorySemanticsMaskNone
));
// TBD: what are the correct memory semantics?
if
(
opCode
==
spv
::
OpAtomicCompareExchange
)
{
// There are 2 memory semantics for compare-exchange
spvAtomicOperands
.
push_back
(
builder
.
makeUintConstant
(
spv
::
MemorySemanticsMaskNone
));
}
// Add the rest of the operands, skipping the first one, which was dealt with above.
// Add the rest of the operands, skipping the first one, which was dealt with above.
// For some ops, there are none, for some 1, for compare-exchange, 2.
// For some ops, there are none, for some 1, for compare-exchange, 2.
...
...
SPIRV/SpvBuilder.h
View file @
04db3f5a
...
@@ -138,11 +138,6 @@ public:
...
@@ -138,11 +138,6 @@ public:
bool
isConstantScalar
(
Id
resultId
)
const
{
return
getOpCode
(
resultId
)
==
OpConstant
;
}
bool
isConstantScalar
(
Id
resultId
)
const
{
return
getOpCode
(
resultId
)
==
OpConstant
;
}
unsigned
int
getConstantScalar
(
Id
resultId
)
const
{
return
module
.
getInstruction
(
resultId
)
->
getImmediateOperand
(
0
);
}
unsigned
int
getConstantScalar
(
Id
resultId
)
const
{
return
module
.
getInstruction
(
resultId
)
->
getImmediateOperand
(
0
);
}
bool
isSignedType
(
Id
typeId
)
const
{
assert
(
getTypeClass
(
typeId
)
==
OpTypeInt
);
return
module
.
getInstruction
(
typeId
)
->
getImmediateOperand
(
1
)
==
0u
;
}
int
getTypeNumColumns
(
Id
typeId
)
const
int
getTypeNumColumns
(
Id
typeId
)
const
{
{
...
...
SPIRV/disassemble.cpp
View file @
04db3f5a
...
@@ -386,6 +386,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
...
@@ -386,6 +386,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode,
OperandClass
operandClass
=
InstructionDesc
[
opCode
].
operands
.
getClass
(
op
);
OperandClass
operandClass
=
InstructionDesc
[
opCode
].
operands
.
getClass
(
op
);
switch
(
operandClass
)
{
switch
(
operandClass
)
{
case
OperandId
:
case
OperandId
:
case
OperandScope
:
case
OperandMemorySemantics
:
disassembleIds
(
1
);
disassembleIds
(
1
);
// Get names for printing "(XXX)" for readability, *after* this id
// Get names for printing "(XXX)" for readability, *after* this id
if
(
opCode
==
OpName
)
if
(
opCode
==
OpName
)
...
...
glslang/Include/intermediate.h
View file @
04db3f5a
...
@@ -617,6 +617,7 @@ struct TCrackedTextureOp {
...
@@ -617,6 +617,7 @@ struct TCrackedTextureOp {
bool
query
;
bool
query
;
bool
proj
;
bool
proj
;
bool
lod
;
bool
lod
;
bool
sample
;
bool
fetch
;
bool
fetch
;
bool
offset
;
bool
offset
;
bool
offsets
;
bool
offsets
;
...
@@ -639,11 +640,12 @@ public:
...
@@ -639,11 +640,12 @@ public:
bool
isImage
()
const
{
return
op
>
EOpImageGuardBegin
&&
op
<
EOpImageGuardEnd
;
}
bool
isImage
()
const
{
return
op
>
EOpImageGuardBegin
&&
op
<
EOpImageGuardEnd
;
}
// Crack the op into the individual dimensions of texturing operation.
// Crack the op into the individual dimensions of texturing operation.
void
crackTexture
(
TCrackedTextureOp
&
cracked
)
const
void
crackTexture
(
T
Sampler
sampler
,
T
CrackedTextureOp
&
cracked
)
const
{
{
cracked
.
query
=
false
;
cracked
.
query
=
false
;
cracked
.
proj
=
false
;
cracked
.
proj
=
false
;
cracked
.
lod
=
false
;
cracked
.
lod
=
false
;
cracked
.
sample
=
false
;
cracked
.
fetch
=
false
;
cracked
.
fetch
=
false
;
cracked
.
offset
=
false
;
cracked
.
offset
=
false
;
cracked
.
offsets
=
false
;
cracked
.
offsets
=
false
;
...
@@ -670,10 +672,22 @@ public:
...
@@ -670,10 +672,22 @@ public:
break
;
break
;
case
EOpTextureFetch
:
case
EOpTextureFetch
:
cracked
.
fetch
=
true
;
cracked
.
fetch
=
true
;
if
(
sampler
.
dim
==
Esd1D
||
sampler
.
dim
==
Esd2D
||
sampler
.
dim
==
Esd3D
)
{
if
(
sampler
.
ms
)
cracked
.
sample
=
true
;
else
cracked
.
lod
=
true
;
}
break
;
break
;
case
EOpTextureFetchOffset
:
case
EOpTextureFetchOffset
:
cracked
.
fetch
=
true
;
cracked
.
fetch
=
true
;
cracked
.
offset
=
true
;
cracked
.
offset
=
true
;
if
(
sampler
.
dim
==
Esd1D
||
sampler
.
dim
==
Esd2D
||
sampler
.
dim
==
Esd3D
)
{
if
(
sampler
.
ms
)
cracked
.
sample
=
true
;
else
cracked
.
lod
=
true
;
}
break
;
break
;
case
EOpTextureProjOffset
:
case
EOpTextureProjOffset
:
cracked
.
offset
=
true
;
cracked
.
offset
=
true
;
...
...
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