mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
Descriptorize Texture
This patch introduces texture descriptor for texture creation instead of texture builders. This patch also adds "arrayLayer" to texture descriptor and removes mDevice in TextureD3D12.
This commit is contained in:
committed by
Corentin Wallez
parent
75559bf1be
commit
425428f97b
@@ -13,6 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
#include "dawn_native/opengl/TextureGL.h"
|
||||
#include "dawn_native/opengl/DeviceGL.h"
|
||||
|
||||
#include "common/Assert.h"
|
||||
|
||||
@@ -67,11 +68,12 @@ namespace dawn_native { namespace opengl {
|
||||
|
||||
// Texture
|
||||
|
||||
Texture::Texture(TextureBuilder* builder) : Texture(builder, GenTexture()) {
|
||||
Texture::Texture(Device* device, const TextureDescriptor* descriptor)
|
||||
: Texture(device, descriptor, GenTexture()) {
|
||||
}
|
||||
|
||||
Texture::Texture(TextureBuilder* builder, GLuint handle)
|
||||
: TextureBase(builder), mHandle(handle) {
|
||||
Texture::Texture(Device* device, const TextureDescriptor* descriptor, GLuint handle)
|
||||
: TextureBase(device, descriptor), mHandle(handle) {
|
||||
mTarget = TargetForDimension(GetDimension());
|
||||
|
||||
uint32_t width = GetWidth();
|
||||
|
||||
Reference in New Issue
Block a user