21 std::unique_ptr<Recorder> recorder = context->makeRecorder();
32 smWriter0.write(0,
src, 4, 3, 3,
34 smWriter0.write(6,
src, 4, 2, 2,
38 smWriter1.write(0,
src, 4, 2, 2,
47 lgWriter.write(0,
src, 4, 2, 2,
53 const void* lgBufferMap =
const_cast<Buffer*
>(lgBufferInfo.fBuffer)->
map();
54 const char expectedLgBufferMap[4] = {
59 memcmp(lgBufferMap, expectedLgBufferMap,
sizeof(expectedLgBufferMap)) == 0);
63 smWriter2.write(0,
src, 4, 2, 2,
70 const char* smBufferMap =
71 reinterpret_cast<const char*
>(
const_cast<Buffer*
>(smBufferInfo0.fBuffer)->
map());
75 const char expectedSmBuffer0[10] = { 1, 2, 3, 5, 6, 7, 1, 2, 5, 6 };
76 const char expectedSmBuffer1[4] = { 1, 2, 5, 6 };
77 const char expectedSmBuffer2[2] = { 1, 2};
80 sizeof(expectedSmBuffer0)) == 0);
83 sizeof(expectedSmBuffer1)) == 0);
86 sizeof(expectedSmBuffer2)) == 0);
90 auto recording = recorder->snap();
94 alWriter0.write(0,
src, 4, 3, 3,
98 alWriter1.write(0,
src, 4, 2, 2,
109 const char expectedAlBufferMap0[6] = {
114 const char expectedAlBufferMap1[2] = {
119 const void* alBufferMap =
const_cast<Buffer*
>(alBufferInfo0.fBuffer)->
map();
121 memcmp(alBufferMap, expectedAlBufferMap0,
sizeof(expectedAlBufferMap0)) == 0);
123 alBufferMap = SkTAddOffset<const void>(alBufferMap, 8);
125 memcmp(alBufferMap, expectedAlBufferMap1,
sizeof(expectedAlBufferMap1)) == 0);
#define REPORTER_ASSERT(r, cond,...)
std::tuple< TextureUploadWriter, BindBufferInfo > getTextureUploadWriter(size_t requiredBytes, size_t requiredAlignment)
DEF_GRAPHITE_TEST_FOR_RENDERING_CONTEXTS(BufferManagerGpuOnlyBufferTest, reporter, context, CtsEnforcement::kNextRelease)
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>