Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Laszlo Agocs
qtrhi
Commits
4f9b99f5
Commit
4f9b99f5
authored
Mar 16, 2019
by
Laszlo Agocs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename D32 to D32F
parent
2f6d6a84
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
14 deletions
+18
-14
src/rhi/qrhi.cpp
src/rhi/qrhi.cpp
+3
-3
src/rhi/qrhi.h
src/rhi/qrhi.h
+1
-1
src/rhi/qrhid3d11.cpp
src/rhi/qrhid3d11.cpp
+4
-4
src/rhi/qrhigles2.cpp
src/rhi/qrhigles2.cpp
+2
-2
src/rhi/qrhimetal.mm
src/rhi/qrhimetal.mm
+5
-1
src/rhi/qrhiprofiler.cpp
src/rhi/qrhiprofiler.cpp
+1
-1
src/rhi/qrhivulkan.cpp
src/rhi/qrhivulkan.cpp
+2
-2
No files found.
src/rhi/qrhi.cpp
View file @
4f9b99f5
...
...
@@ -1318,7 +1318,7 @@ QRhiTextureRenderTargetDescription::QRhiTextureRenderTargetDescription(const QRh
with \a depthTexture.
\note \a depthTexture must have a suitable format, such as QRhiTexture::D16
or QRhiTexture::D32.
or QRhiTexture::D32
F
.
*/
QRhiTextureRenderTargetDescription
::
QRhiTextureRenderTargetDescription
(
const
QRhiColorAttachment
&
colorAttachment
,
QRhiTexture
*
depthTexture
)
...
...
@@ -1888,7 +1888,7 @@ QRhiRenderBuffer::QRhiRenderBuffer(QRhiImplementation *rhi, Type type_, const QS
\value D16 16-bit depth (normalized unsigned integer)
\value D32 32-bit depth (32-bit float)
\value D32
F
32-bit depth (32-bit float)
\value BC1
\value BC2
...
...
@@ -3254,7 +3254,7 @@ void QRhiImplementation::textureFormatInfo(QRhiTexture::Format format, const QSi
case
QRhiTexture
::
D16
:
bpc
=
2
;
break
;
case
QRhiTexture
::
D32
:
case
QRhiTexture
::
D32
F
:
bpc
=
4
;
break
;
...
...
src/rhi/qrhi.h
View file @
4f9b99f5
...
...
@@ -647,7 +647,7 @@ public:
RGBA32F
,
D16
,
D32
,
D32
F
,
BC1
,
BC2
,
...
...
src/rhi/qrhid3d11.cpp
View file @
4f9b99f5
...
...
@@ -875,7 +875,7 @@ static inline DXGI_FORMAT toD3DTextureFormat(QRhiTexture::Format format, QRhiTex
case
QRhiTexture
::
D16
:
return
DXGI_FORMAT_R16_TYPELESS
;
case
QRhiTexture
::
D32
:
case
QRhiTexture
::
D32
F
:
return
DXGI_FORMAT_R32_TYPELESS
;
case
QRhiTexture
::
BC1
:
...
...
@@ -968,7 +968,7 @@ static inline bool isDepthTextureFormat(QRhiTexture::Format format)
switch
(
format
)
{
case
QRhiTexture
::
Format
::
D16
:
Q_FALLTHROUGH
();
case
QRhiTexture
::
Format
::
D32
:
case
QRhiTexture
::
Format
::
D32
F
:
return
true
;
default:
...
...
@@ -1976,7 +1976,7 @@ static inline DXGI_FORMAT toD3DDepthTextureSRVFormat(QRhiTexture::Format format)
switch
(
format
)
{
case
QRhiTexture
::
Format
::
D16
:
return
DXGI_FORMAT_R16_FLOAT
;
case
QRhiTexture
::
Format
::
D32
:
case
QRhiTexture
::
Format
::
D32
F
:
return
DXGI_FORMAT_R32_FLOAT
;
default:
Q_UNREACHABLE
();
...
...
@@ -1989,7 +1989,7 @@ static inline DXGI_FORMAT toD3DDepthTextureDSVFormat(QRhiTexture::Format format)
switch
(
format
)
{
case
QRhiTexture
::
Format
::
D16
:
return
DXGI_FORMAT_D16_UNORM
;
case
QRhiTexture
::
Format
::
D32
:
case
QRhiTexture
::
Format
::
D32
F
:
return
DXGI_FORMAT_D32_FLOAT
;
default:
Q_UNREACHABLE
();
...
...
src/rhi/qrhigles2.cpp
View file @
4f9b99f5
...
...
@@ -473,7 +473,7 @@ bool QRhiGles2::isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture
switch
(
format
)
{
case
QRhiTexture
::
D16
:
Q_FALLTHROUGH
();
case
QRhiTexture
::
D32
:
case
QRhiTexture
::
D32
F
:
return
caps
.
depthTexture
;
case
QRhiTexture
::
BGRA8
:
...
...
@@ -2104,7 +2104,7 @@ bool QGles2Texture::prepareBuild(QSize *adjustedSize)
glformat
=
GL_DEPTH_COMPONENT
;
gltype
=
GL_UNSIGNED_SHORT
;
break
;
case
QRhiTexture
::
D32
:
case
QRhiTexture
::
D32
F
:
glintformat
=
GL_DEPTH_COMPONENT32F
;
glformat
=
GL_DEPTH_COMPONENT
;
gltype
=
GL_FLOAT
;
...
...
src/rhi/qrhimetal.mm
View file @
4f9b99f5
...
...
@@ -1895,8 +1895,12 @@ static inline MTLPixelFormat toMetalTextureFormat(QRhiTexture::Format format, QR
return
MTLPixelFormatRGBA32Float
;
case
QRhiTexture
::
D16
:
#ifdef Q_OS_MAC
return
MTLPixelFormatDepth16Unorm
;
case
QRhiTexture
::
D32
:
#else
return
MTLPixelFormatDepth32Float
;
#endif
case
QRhiTexture
::
D32F
:
return
MTLPixelFormatDepth32Float
;
#ifdef Q_OS_MACOS
...
...
src/rhi/qrhiprofiler.cpp
View file @
4f9b99f5
...
...
@@ -374,7 +374,7 @@ void QRhiProfilerPrivate::newRenderBuffer(QRhiRenderBuffer *rb, bool transientBa
const
QRhiRenderBuffer
::
Type
type
=
rb
->
type
();
const
QSize
sz
=
rb
->
pixelSize
();
// just make up something, ds is likely D24S8 while color is RGBA8 or similar
const
QRhiTexture
::
Format
assumedFormat
=
type
==
QRhiRenderBuffer
::
DepthStencil
?
QRhiTexture
::
D32
:
QRhiTexture
::
RGBA8
;
const
QRhiTexture
::
Format
assumedFormat
=
type
==
QRhiRenderBuffer
::
DepthStencil
?
QRhiTexture
::
D32
F
:
QRhiTexture
::
RGBA8
;
quint32
byteSize
=
rhiDWhenEnabled
->
approxByteSizeForTexture
(
assumedFormat
,
sz
,
1
,
1
);
if
(
sampleCount
>
1
)
byteSize
*=
sampleCount
;
...
...
src/rhi/qrhivulkan.cpp
View file @
4f9b99f5
...
...
@@ -651,7 +651,7 @@ static inline VkFormat toVkTextureFormat(QRhiTexture::Format format, QRhiTexture
case
QRhiTexture
::
D16
:
return
VK_FORMAT_D16_UNORM
;
case
QRhiTexture
::
D32
:
case
QRhiTexture
::
D32
F
:
return
VK_FORMAT_D32_SFLOAT
;
case
QRhiTexture
::
BC1
:
...
...
@@ -746,7 +746,7 @@ static inline bool isDepthTextureFormat(QRhiTexture::Format format)
switch
(
format
)
{
case
QRhiTexture
::
Format
::
D16
:
Q_FALLTHROUGH
();
case
QRhiTexture
::
Format
::
D32
:
case
QRhiTexture
::
Format
::
D32
F
:
return
true
;
default:
...
...
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