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 4388 - D3D11 renderer's rect/line/point drawing functions don't work
Summary: D3D11 renderer's rect/line/point drawing functions don't work
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: HG 2.0
Hardware: x86_64 Windows 10
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-16 19:11 UTC by Bogomancer
Modified: 2018-11-18 10:27 UTC (History)
1 user (show)

See Also:


Attachments
Program that demostrates the bug (2.25 KB, text/plain)
2018-11-16 19:11 UTC, Bogomancer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bogomancer 2018-11-16 19:11:06 UTC
Created attachment 3498 [details]
Program that demostrates the bug

When using the D3D11 renderer, the following functions don't appear to do anything at all:

SDL_RenderFillRect()
SDL_RenderDrawRect()
SDL_RenderDrawPoint()
SDL_RenderDrawLine()

Texture drawing functions like SDL_RenderCopy() are unaffected. My guess is the problem was introduced when Ryan's batching code was merged; the D3D11 backend was fine before.

I've attached an 80-line program that draws some shapes using the aforementioned functions. It works as expected with the 'direct3d' and 'opengl' drivers, but gives me a black window for 'direct3d11'.

Let me know if you can't repro, or if any more details are needed.
Comment 1 Ryan C. Gordon 2018-11-17 04:07:56 UTC
Just as a quick sanity check on your side, can you change this line...

        SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);
        SDL_RenderClear(renderer);

...to...
        SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
        SDL_RenderClear(renderer);

...and see if it still fails?

Thanks,
--ryan.
Comment 2 Bogomancer 2018-11-17 07:49:12 UTC
Done, it still fails. And the other backends still handle it without problems.
Comment 3 Ryan C. Gordon 2018-11-17 16:40:20 UTC
(In reply to Bogomancer from comment #2)
> Done, it still fails. And the other backends still handle it without
> problems.

Checking.

--ryan.
Comment 4 Ryan C. Gordon 2018-11-17 19:40:12 UTC
Fixed in https://hg.libsdl.org/SDL/rev/112261d96866, thanks!

--ryan.
Comment 5 Bogomancer 2018-11-18 10:27:09 UTC
Sweet! Thanks, Ryan!