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
7208a974
Commit
7208a974
authored
Oct 12, 2016
by
Maciej Jesionowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPV: Use SampledImage with OpImageQueryLod
Khronos SPIR-V issue #74
parent
631f223b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+3
-2
hlsl.calculatelod.dx10.frag.out
Test/baseResults/hlsl.calculatelod.dx10.frag.out
+0
-0
spv.queryL.frag.out
Test/baseResults/spv.queryL.frag.out
+0
-0
No files found.
SPIRV/GlslangToSpv.cpp
View file @
7208a974
...
@@ -2745,9 +2745,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
...
@@ -2745,9 +2745,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
// Check for queries
// Check for queries
if
(
cracked
.
query
)
{
if
(
cracked
.
query
)
{
//
a sampled image needs to have the imag
e extracted first
//
OpImageQueryLod works on a sampled image, for other queries the image has to b
e extracted first
if
(
builder
.
isSampledImage
(
params
.
sampler
))
if
(
node
->
getOp
()
!=
glslang
::
EOpTextureQueryLod
&&
builder
.
isSampledImage
(
params
.
sampler
))
params
.
sampler
=
builder
.
createUnaryOp
(
spv
::
OpImage
,
builder
.
getImageType
(
params
.
sampler
),
params
.
sampler
);
params
.
sampler
=
builder
.
createUnaryOp
(
spv
::
OpImage
,
builder
.
getImageType
(
params
.
sampler
),
params
.
sampler
);
switch
(
node
->
getOp
())
{
switch
(
node
->
getOp
())
{
case
glslang
:
:
EOpImageQuerySize
:
case
glslang
:
:
EOpImageQuerySize
:
case
glslang
:
:
EOpTextureQuerySize
:
case
glslang
:
:
EOpTextureQuerySize
:
...
...
Test/baseResults/hlsl.calculatelod.dx10.frag.out
View file @
7208a974
This diff is collapsed.
Click to expand it.
Test/baseResults/spv.queryL.frag.out
View file @
7208a974
This diff is collapsed.
Click to expand it.
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