We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4916 - macOS build error in SDL_render_metal.m
Summary: macOS build error in SDL_render_metal.m
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: HG 2.0
Hardware: All Mac OS X (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.12
Depends on:
Blocks:
 
Reported: 2019-12-23 09:55 UTC by Ozkan Sezer
Modified: 2019-12-23 16:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ozkan Sezer 2019-12-23 09:55:20 UTC
With current hg and clang-5.0.2, I get:

src/render/metal/SDL_render_metal.m:955:34: error: use of undeclared identifier 'data'
        texturedata.mtlsampler = data.mtlsamplernearest;
                                 ^
src/render/metal/SDL_render_metal.m:957:34: error: use of undeclared identifier 'data'
        texturedata.mtlsampler = data.mtlsamplerlinear;
                                 ^
2 errors generated.
Comment 1 Ozkan Sezer 2019-12-23 16:26:08 UTC
This seems to be after changeset 13376:35f99d918ca2 for bug #4914.
Comment 2 Konrad 2019-12-23 16:32:49 UTC
Add:

METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;

To:

METAL_SetTextureScaleMode

Above:

METAL_TextureData *texturedata

Can you please fix it?
Comment 3 Ozkan Sezer 2019-12-23 16:55:58 UTC
Thanks: https://hg.libsdl.org/SDL/rev/7cc4fc886d9e
Closing as fixed.