On 10 February 2016 at 02:14, Józef Kucia jkucia@codeweavers.com wrote:
+enum wined3d_channel_type +{
- C_UNUSED,
- C_UNORM,
- C_SNORM,
- C_UINT,
- C_SINT,
- C_FLOAT,
- C_DEPTH,
- C_STENCIL
+};
These would need to be called something like WINED3D_CHANNEL_TYPE_UNORM, etc. Those are a bit longer to type, but we could use a scheme similar to the opcode table in shader_sm4.c to keep the table readable. (Perhaps "I" -> SINT, "i" -> SNORM, "S" -> STENCIL, etc.)
+struct wined3d_typed_format_info { enum wined3d_format_id id; enum wined3d_format_id typeless_id;
- enum wined3d_channel_type red_channel;
- enum wined3d_channel_type green_channel;
- enum wined3d_channel_type blue_channel;
- enum wined3d_channel_type alpha_channel;
};
Just a thought, but would it make things easier if the channel types were an array? It would probably make sense for struct wined3d_format at least to have something like
struct { unsigned int size; unsigned int offset; enum wined3d_channel_type type; } channels[4];