Closed Bug 1544050 Opened 5 years ago Closed 4 years ago

Stop using texture arrays for webrender texture cache

Categories

(Core :: Graphics: WebRender, task, P2)

task

Tracking

()

RESOLVED DUPLICATE of bug 1673387

People

(Reporter: jnicol, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: wr-planning)

Use a 2D texture instead. This will allow us to run on GLES 2, and to use texture rectangle on mac (for core animation). It will also avoid that Adreno blitting bug.

The reason for switching to an array was I believe so we can start off with a single layer and grow the cache dynamically. So we should keep this behaviour by increasing and decreasing the size of the texture.

Type: defect → task
Whiteboard: [wr-q2][wr-may]
See Also: → 1555002

It appears that we'll unlikely need GLES2, so no need to rush with this bug.

Whenever we get to this, let's try to remove the reftest adjustments that were made in bug 1616901.

Blocks: 1479792

Apple says the following about texture types1:

Some hardware requires texture dimensions to be a power-of-two before the hardware can upload the data using DMA. The rectangle texture extension (ARB_texture_rectangle) was introduced to allow texture targets for textures of any dimensions—that is, rectangle textures (GL_TEXTURE_RECTANGLE_ARB). You need to use the rectangle texture extension together with the Apple texture range extension to ensure OpenGL uses DMA to access your texture data. These extensions allow you to bypass the OpenGL driver, as shown in Figure 11-5.

Note that OpenGL does not use DMA for a power-of-two texture target (GL_TEXTURE_2D). So, unlike the rectangular texture, the power-of-two texture will incur one additional copy and performance won't be quite as fast. The performance typically isn't an issue because games, which are the applications most likely to use power-of-two textures, load textures at the start of a game or level and don't upload textures in real time as often as applications that use rectangular textures, which usually play video or display images.

Jeff's texture upload test program confirms that Intel GPUs on Mac benefit from using rectangle textures.

Whiteboard: [wr-q2][wr-may] → wr-planning
Assignee: jnicol → nobody

Miko, that's some weird statement on Apple part. First, saying that DMA transfers require power-of-two, and then saying that we get no DMA even for power-of-two. Can you clarify in more detail how this is confirmed by the test program?

Flags: needinfo?(mikokm)
Flags: needinfo?(mikokm)

It seems that the performance regression we spotted with this in the test program is due to Intel being more picky about texture formats.

No longer blocks: 1479792
Blocks: wr-mac
No longer blocks: wr-mac-block

Duping this on bug 1673387 since that has patches

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
No longer blocks: 1650428
No longer blocks: wr-gles2
You need to log in before you can comment on or make changes to this bug.