Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Laszlo Agocs
qtrhi
Commits
896ca1bd
Commit
896ca1bd
authored
Feb 28, 2019
by
Laszlo Agocs
Browse files
Fix d3d build
parent
2cf655db
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/rhi/qrhid3d11.cpp
View file @
896ca1bd
...
...
@@ -504,9 +504,9 @@ void QRhiD3D11::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
if
(
bufD
->
m_type
==
QRhiBuffer
::
Dynamic
)
executeBufferHostWritesForCurrentFrame
(
bufD
);
if
(
bufD
->
generation
!=
bd
.
ubuf
.
generation
||
bufD
->
id
!=
bd
.
ubuf
.
id
)
{
if
(
bufD
->
generation
!=
bd
.
ubuf
.
generation
||
bufD
->
m_
id
!=
bd
.
ubuf
.
id
)
{
srbUpdate
=
true
;
bd
.
ubuf
.
id
=
bufD
->
id
;
bd
.
ubuf
.
id
=
bufD
->
m_
id
;
bd
.
ubuf
.
generation
=
bufD
->
generation
;
}
...
...
@@ -519,14 +519,14 @@ void QRhiD3D11::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
QD3D11Texture
*
texD
=
QRHI_RES
(
QD3D11Texture
,
b
->
u
.
stex
.
tex
);
QD3D11Sampler
*
samplerD
=
QRHI_RES
(
QD3D11Sampler
,
b
->
u
.
stex
.
sampler
);
if
(
texD
->
generation
!=
bd
.
stex
.
texGeneration
||
texD
->
id
!=
bd
.
stex
.
texId
||
texD
->
m_
id
!=
bd
.
stex
.
texId
||
samplerD
->
generation
!=
bd
.
stex
.
samplerGeneration
||
samplerD
->
id
!=
bd
.
stex
.
samplerId
)
||
samplerD
->
m_
id
!=
bd
.
stex
.
samplerId
)
{
srbUpdate
=
true
;
bd
.
stex
.
texId
=
texD
->
id
;
bd
.
stex
.
texId
=
texD
->
m_
id
;
bd
.
stex
.
texGeneration
=
texD
->
generation
;
bd
.
stex
.
samplerId
=
samplerD
->
id
;
bd
.
stex
.
samplerId
=
samplerD
->
m_
id
;
bd
.
stex
.
samplerGeneration
=
samplerD
->
generation
;
}
}
...
...
@@ -1461,7 +1461,7 @@ void QRhiD3D11::updateShaderResourceBindings(QD3D11ShaderResourceBindings *srbD)
{
QD3D11Buffer
*
bufD
=
QRHI_RES
(
QD3D11Buffer
,
b
->
u
.
ubuf
.
buf
);
Q_ASSERT
(
aligned
(
b
->
u
.
ubuf
.
offset
,
256
)
==
b
->
u
.
ubuf
.
offset
);
bd
.
ubuf
.
id
=
bufD
->
id
;
bd
.
ubuf
.
id
=
bufD
->
m_
id
;
bd
.
ubuf
.
generation
=
bufD
->
generation
;
// dynamic ubuf offsets are not considered here, those are baked in
// at a later stage, which is good as vsubufoffsets and friends are
...
...
@@ -1489,9 +1489,9 @@ void QRhiD3D11::updateShaderResourceBindings(QD3D11ShaderResourceBindings *srbD)
// with registers sN and tN by SPIRV-Cross.
QD3D11Texture
*
texD
=
QRHI_RES
(
QD3D11Texture
,
b
->
u
.
stex
.
tex
);
QD3D11Sampler
*
samplerD
=
QRHI_RES
(
QD3D11Sampler
,
b
->
u
.
stex
.
sampler
);
bd
.
stex
.
texId
=
texD
->
id
;
bd
.
stex
.
texId
=
texD
->
m_
id
;
bd
.
stex
.
texGeneration
=
texD
->
generation
;
bd
.
stex
.
samplerId
=
samplerD
->
id
;
bd
.
stex
.
samplerId
=
samplerD
->
m_
id
;
bd
.
stex
.
samplerGeneration
=
samplerD
->
generation
;
if
(
b
->
stage
.
testFlag
(
QRhiShaderResourceBinding
::
VertexStage
))
{
srbD
->
vssamplers
.
feed
(
b
->
binding
,
samplerD
->
samplerState
);
...
...
@@ -2393,7 +2393,7 @@ void QD3D11TextureRenderTarget::release()
QRhiRenderPassDescriptor
*
QD3D11TextureRenderTarget
::
newCompatibleRenderPassDescriptor
()
{
return
new
QD3D11RenderPassDescriptor
(
rhi
);
return
new
QD3D11RenderPassDescriptor
(
m_
rhi
);
}
bool
QD3D11TextureRenderTarget
::
build
()
...
...
@@ -3061,7 +3061,7 @@ QSize QD3D11SwapChain::surfacePixelSize()
QRhiRenderPassDescriptor
*
QD3D11SwapChain
::
newCompatibleRenderPassDescriptor
()
{
return
new
QD3D11RenderPassDescriptor
(
rhi
);
return
new
QD3D11RenderPassDescriptor
(
m_
rhi
);
}
bool
QD3D11SwapChain
::
newColorBuffer
(
const
QSize
&
size
,
DXGI_FORMAT
format
,
DXGI_SAMPLE_DESC
sampleDesc
,
...
...
Write
Preview
Supports
Markdown
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