MCPcopy Create free account
hub / github.com/baldurk/renderdoc / CopyArrayToTex2DMS

Method CopyArrayToTex2DMS

renderdoc/driver/gl/gl_msaa_array_conv.cpp:348–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348void WrappedOpenGL::CopyArrayToTex2DMS(GLuint destMS, GLuint srcArray, GLint width, GLint height,
349 GLint arraySize, GLint samples, GLenum intFormat,
350 uint32_t selectedSlice)
351{
352 WrappedOpenGL &drv = *this;
353
354 intFormat = GetSizedFormat(intFormat);
355
356 const ArrayMSPrograms &arrms = GetArrayMS();
357
358 if(!HasExt[ARB_compute_shader])
359 {
360 RDCWARN(
361 "Can't copy array to multisampled texture for serialisation without ARB_compute_shader.");
362 return;
363 }
364
365 if(!HasExt[ARB_texture_view])
366 {
367 RDCWARN("Can't copy array to multisampled texture for serialisation without ARB_texture_view.");
368 return;
369 }
370
371 if(!HasExt[ARB_texture_storage])
372 {
373 RDCWARN(
374 "Can't copy array to multisampled texture for serialisation without ARB_texture_view, and "
375 "ARB_texture_view requires ARB_texture_storage.");
376 return;
377 }
378
379 if(!arrms.Array2MS || (IsDepthStencilFormat(intFormat) && !arrms.DepthArray2MS))
380 {
381 return;
382 }
383
384 if(IsDepthStencilFormat(intFormat))
385 {
386 CopyDepthArrayToTex2DMS(destMS, srcArray, width, height, arraySize, samples, intFormat,
387 selectedSlice);
388 return;
389 }
390
391 GLMarkerRegion renderoverlay("CopyArrayToTex2DMS");
392
393 bool singleSliceMode = (selectedSlice != ~0U);
394
395 GLRenderState rs;
396 rs.FetchState(this);
397
398 GLenum viewClass;
399 drv.glGetInternalformativ(eGL_TEXTURE_2D_ARRAY, intFormat, eGL_VIEW_COMPATIBILITY_CLASS, 1,
400 (GLint *)&viewClass);
401
402 GLenum fmt = eGL_R32UI;
403 if(viewClass == eGL_VIEW_CLASS_8_BITS)
404 fmt = eGL_R8UI;
405 else if(viewClass == eGL_VIEW_CLASS_16_BITS)

Callers 2

SetProxyTextureDataMethod · 0.45

Calls 15

GetSizedFormatFunction · 0.85
IsDepthStencilFormatFunction · 0.85
FetchStateMethod · 0.80
glGetInternalformativMethod · 0.45
glGenTexturesMethod · 0.45
glTextureViewMethod · 0.45
glBindImageTextureMethod · 0.45
glActiveTextureMethod · 0.45
glBindTextureMethod · 0.45
glUseProgramMethod · 0.45
glGetUniformLocationMethod · 0.45

Tested by

no test coverage detected