218{
223 unsigned int section_count,
i;
226
228 {
229 WARN(
"Invalid arguments: data %p, data_size %Iu, flags %#x, blob %p.\n",
data, data_size,
flags,
blob);
231 }
232
235 {
238 }
239
241 {
242 WARN(
"Failed to parse source data, ret %d.\n",
ret);
244 }
245
247 {
248 ERR(
"Failed to allocate sections memory.\n");
251 }
252
253 for (
i = 0, section_count = 0;
i < src_dxbc_desc.section_count; ++
i)
254 {
256
258 sections[section_count++] = *src_section;
259 }
260
261 switch(part)
262 {
270 if (section_count != 1)
271 section_count = 0;
272 break;
273
275 if (section_count != 2)
276 section_count = 0;
277 break;
278
280 if (section_count != 3)
281 section_count = 0;
282 break;
283
284 default:
286 break;
287 }
288
289 if (!section_count)
290 {
291 WARN(
"Nothing to write into the blob.\n");
293 goto done;
294 }
295
296
299 {
301 }
303 {
304 WARN(
"Failed to serialise DXBC, ret %d.\n",
ret);
306 goto done;
307 }
308
310 WARN(
"Failed to create blob, hr %#lx.\n",
hr);
311 else
312 memcpy(ID3D10Blob_GetBufferPointer(*
blob), dst_dxbc.code, dst_dxbc.size);
313 if (dst_dxbc.code !=
sections[0].data.code)
315
316done:
319
321}
#define D3DERR_INVALIDCALL
@ D3D_BLOB_TEST_COMPILE_PERF
HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3DBlob **blob)
static BOOL check_blob_part(DWORD tag, D3D_BLOB_PART part)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
struct section sections[2]
VKD3D_SHADER_API void vkd3d_shader_free_shader_code(struct vkd3d_shader_code *code)
VKD3D_SHADER_API int vkd3d_shader_serialize_dxbc(size_t section_count, const struct vkd3d_shader_dxbc_section_desc *sections, struct vkd3d_shader_code *dxbc, char **messages)
VKD3D_SHADER_API void vkd3d_shader_free_dxbc(struct vkd3d_shader_dxbc_desc *dxbc)
VKD3D_SHADER_API int vkd3d_shader_parse_dxbc(const struct vkd3d_shader_code *dxbc, uint32_t flags, struct vkd3d_shader_dxbc_desc *desc, char **messages)