54 format->deinterleaved =
false;
57 format->attrs[i].name_len = 0;
73 const uint sizes[] = {1, 1, 2, 2, 4, 4, 4};
91 if (
a->comp_len == 3 &&
c <= 2) {
103 return format->stride * vertex_len;
110 char *name_copy =
format->names + name_offset;
112 bool terminated =
false;
114 for (
uint i = 0; i < available; i++) {
115 const char c = name[i];
119 format->name_offset += (i + 1);
142 assert((comp_len >= 1 && comp_len <= 4) || comp_len == 8 || comp_len == 12 || comp_len == 16);
152 assert(comp_len == 3 || comp_len == 4);
162 assert(comp_len != 8 && comp_len != 12 && comp_len != 16);
218 int attr_len =
format->attr_len;
219 for (
int i = 0; i < attr_len; i++, attr++) {
221 for (
int j = 1; j < load_count; j++) {
223 BLI_snprintf(load_name,
sizeof(load_name),
"%s%d", attr_name, j);
236 for (
int i = 0; i <
format->attr_len; i++) {
238 for (
int j = 0; j < attr->
name_len; j++) {
240 if (
STREQ(name, attr_name)) {
253 BLI_assert(strlen(attr_name) == strlen(new_name));
255 while (attr_name[i] !=
'\0') {
256 attr_name[i] = new_name[i];
265 char safe_chars[] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
268 for (
int i = 0; i < 11; i++) {
269 out[i] = safe_chars[in % 62lu];
283 for (
int i = 0; i < 4; i++) {
284 data[i] = attr_name[i];
294 for (
int i = 0; i < 8 && attr_name[i] !=
'\0'; i++) {
295 data[i] = attr_name[i];
301 r_safe_name[11] =
'\0';
305 printf(
"%s > %lx > %s\n", attr_name, *(
uint64_t *)
data, r_safe_name);
329 format->deinterleaved =
true;
334 const uint mod = offset % alignment;
335 return (
mod == 0) ? 0 : (alignment -
mod);
341 const char c =
'A' + a_idx;
342 for (
uint i = 0; i < pad; i++) {
345 for (
uint i = 0; i < sz; i++) {
358 show_pack(0, a0->
sz, 0);
361 for (
uint a_idx = 1; a_idx <
format->attr_len; a_idx++) {
364 offset += mid_padding;
369 show_pack(a_idx,
a->sz, mid_padding);
376 show_pack(0, 0, end_padding);
379 format->stride = offset + end_padding;
unsigned int BLI_ghashutil_strhash_p_murmur(const void *ptr)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
struct GPUShader GPUShader
struct @612::@615 attr_id
void KERNEL_FUNCTION_FULL_NAME() shader(KernelGlobals *kg, uint4 *input, float4 *output, int type, int filter, int i, int offset, int sample)
unsigned __int64 uint64_t
uchar names[GPU_VERT_ATTR_MAX_NAMES]
ccl_device_inline int mod(int x, int m)