Page MenuHome

Added test case to research support of texture sizes
AbandonedPublic

Authored by Jeroen Bakker (jbakker) on Nov 11 2020, 2:23 PM.

Details

Summary

Outcome when running and analyzing the data on Linux RX5700

  • MIP levels doesn't make a difference.
  • The next formats will fail when one dimension is larger than GL_MAX_TEXTURE_SIZE
    • GPU_R16, GPU_R16F, GPU_R16I, GPU_R16UI, GPU_R32F, GPU_R32I, GPU_R32UI, GPU_R8, GPU_R8I, GPU_R8UI, GPU_RG16, GPU_RG16F, GPU_RG16I, GPU_RG16UI, GPU_RG32I, GPU_RG32UI, GPU_RG8, GPU_RGBA32I, GPU_RGBA32UI, GPU_RGBA8, GPU_RGBA8I, GPU_RGBA8UI.
  • The next format will fail based on a buffer size (width * height)
    • GPU_RG32F, GPU_RG8I, GPU_RG8UI, GPU_RGBA16, GPU_RGBA16F.
  • The next formats fail on anything that is larger than 8k
    • GPU_RGBA16I, GPU_RGBA16UI, GPU_RGBA32F.

Looking at the case pointed out in the T82042: Crash when rendering huge images on CPU 2.92.0 alpha the render result could either use GPU_RGBA32F or GPU_RGBA16F. For GPU_RGBA32F we should limit it to 8k, but for GPU_RGBA16F we have another limit based on the size of the buffer.

I also assume this is platform dependent so we might want to request the max dimension based on the texture format and the requested dimension.

Diff Detail

Repository
rB Blender
Branch
T82042_research (branched from master)
Build Status
Buildable 11220
Build 11220: arc lint + arc unit

Event Timeline

Jeroen Bakker (jbakker) requested review of this revision.Nov 11 2020, 2:23 PM
Jeroen Bakker (jbakker) created this revision.
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)Nov 11 2020, 2:48 PM
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)
Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)

Code style formatting

Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)Nov 11 2020, 2:56 PM
Jeroen Bakker (jbakker) added inline comments.
source/blender/gpu/tests/gpu_texture_test.cc
70

clang format

77

clang format

Not sure if this is really needed. You can always check if the requested texture is valid. In fact we should always do this.

I don't see any issue with the code.

From your observation the Integer formats seems to be strangely bigger than it should.

This revision is now accepted and ready to land.Nov 14 2020, 2:34 PM

This code was intended for research. If we actually want a test case we should do this around the ImBuf API.