Lines Matching refs:sw
525 sw::DepthCompareMode ConvertDepthComparison(GLenum comparison) in ConvertDepthComparison()
529 case GL_NEVER: return sw::DEPTH_NEVER; in ConvertDepthComparison()
530 case GL_ALWAYS: return sw::DEPTH_ALWAYS; in ConvertDepthComparison()
531 case GL_LESS: return sw::DEPTH_LESS; in ConvertDepthComparison()
532 case GL_LEQUAL: return sw::DEPTH_LESSEQUAL; in ConvertDepthComparison()
533 case GL_EQUAL: return sw::DEPTH_EQUAL; in ConvertDepthComparison()
534 case GL_GREATER: return sw::DEPTH_GREATER; in ConvertDepthComparison()
535 case GL_GEQUAL: return sw::DEPTH_GREATEREQUAL; in ConvertDepthComparison()
536 case GL_NOTEQUAL: return sw::DEPTH_NOTEQUAL; in ConvertDepthComparison()
540 return sw::DEPTH_ALWAYS; in ConvertDepthComparison()
543 sw::StencilCompareMode ConvertStencilComparison(GLenum comparison) in ConvertStencilComparison()
547 case GL_NEVER: return sw::STENCIL_NEVER; in ConvertStencilComparison()
548 case GL_ALWAYS: return sw::STENCIL_ALWAYS; in ConvertStencilComparison()
549 case GL_LESS: return sw::STENCIL_LESS; in ConvertStencilComparison()
550 case GL_LEQUAL: return sw::STENCIL_LESSEQUAL; in ConvertStencilComparison()
551 case GL_EQUAL: return sw::STENCIL_EQUAL; in ConvertStencilComparison()
552 case GL_GREATER: return sw::STENCIL_GREATER; in ConvertStencilComparison()
553 case GL_GEQUAL: return sw::STENCIL_GREATEREQUAL; in ConvertStencilComparison()
554 case GL_NOTEQUAL: return sw::STENCIL_NOTEQUAL; in ConvertStencilComparison()
558 return sw::STENCIL_ALWAYS; in ConvertStencilComparison()
561 sw::AlphaCompareMode ConvertAlphaComparison(GLenum comparison) in ConvertAlphaComparison()
565 case GL_NEVER: return sw::ALPHA_NEVER; in ConvertAlphaComparison()
566 case GL_ALWAYS: return sw::ALPHA_ALWAYS; in ConvertAlphaComparison()
567 case GL_LESS: return sw::ALPHA_LESS; in ConvertAlphaComparison()
568 case GL_LEQUAL: return sw::ALPHA_LESSEQUAL; in ConvertAlphaComparison()
569 case GL_EQUAL: return sw::ALPHA_EQUAL; in ConvertAlphaComparison()
570 case GL_GREATER: return sw::ALPHA_GREATER; in ConvertAlphaComparison()
571 case GL_GEQUAL: return sw::ALPHA_GREATEREQUAL; in ConvertAlphaComparison()
572 case GL_NOTEQUAL: return sw::ALPHA_NOTEQUAL; in ConvertAlphaComparison()
576 return sw::ALPHA_ALWAYS; in ConvertAlphaComparison()
579 sw::Color<float> ConvertColor(es1::Color color) in ConvertColor()
581 return sw::Color<float>(color.red, color.green, color.blue, color.alpha); in ConvertColor()
584 sw::BlendFactor ConvertBlendFunc(GLenum blend) in ConvertBlendFunc()
588 case GL_ZERO: return sw::BLEND_ZERO; in ConvertBlendFunc()
589 case GL_ONE: return sw::BLEND_ONE; in ConvertBlendFunc()
590 case GL_SRC_COLOR: return sw::BLEND_SOURCE; in ConvertBlendFunc()
591 case GL_ONE_MINUS_SRC_COLOR: return sw::BLEND_INVSOURCE; in ConvertBlendFunc()
592 case GL_DST_COLOR: return sw::BLEND_DEST; in ConvertBlendFunc()
593 case GL_ONE_MINUS_DST_COLOR: return sw::BLEND_INVDEST; in ConvertBlendFunc()
594 case GL_SRC_ALPHA: return sw::BLEND_SOURCEALPHA; in ConvertBlendFunc()
595 case GL_ONE_MINUS_SRC_ALPHA: return sw::BLEND_INVSOURCEALPHA; in ConvertBlendFunc()
596 case GL_DST_ALPHA: return sw::BLEND_DESTALPHA; in ConvertBlendFunc()
597 case GL_ONE_MINUS_DST_ALPHA: return sw::BLEND_INVDESTALPHA; in ConvertBlendFunc()
598 case GL_SRC_ALPHA_SATURATE: return sw::BLEND_SRCALPHASAT; in ConvertBlendFunc()
602 return sw::BLEND_ZERO; in ConvertBlendFunc()
605 sw::BlendOperation ConvertBlendOp(GLenum blendOp) in ConvertBlendOp()
609 case GL_FUNC_ADD_OES: return sw::BLENDOP_ADD; in ConvertBlendOp()
610 case GL_FUNC_SUBTRACT_OES: return sw::BLENDOP_SUB; in ConvertBlendOp()
611 case GL_FUNC_REVERSE_SUBTRACT_OES: return sw::BLENDOP_INVSUB; in ConvertBlendOp()
612 case GL_MIN_EXT: return sw::BLENDOP_MIN; in ConvertBlendOp()
613 case GL_MAX_EXT: return sw::BLENDOP_MAX; in ConvertBlendOp()
617 return sw::BLENDOP_ADD; in ConvertBlendOp()
620 sw::LogicalOperation ConvertLogicalOperation(GLenum logicalOperation) in ConvertLogicalOperation()
624 case GL_CLEAR: return sw::LOGICALOP_CLEAR; in ConvertLogicalOperation()
625 case GL_SET: return sw::LOGICALOP_SET; in ConvertLogicalOperation()
626 case GL_COPY: return sw::LOGICALOP_COPY; in ConvertLogicalOperation()
627 case GL_COPY_INVERTED: return sw::LOGICALOP_COPY_INVERTED; in ConvertLogicalOperation()
628 case GL_NOOP: return sw::LOGICALOP_NOOP; in ConvertLogicalOperation()
629 case GL_INVERT: return sw::LOGICALOP_INVERT; in ConvertLogicalOperation()
630 case GL_AND: return sw::LOGICALOP_AND; in ConvertLogicalOperation()
631 case GL_NAND: return sw::LOGICALOP_NAND; in ConvertLogicalOperation()
632 case GL_OR: return sw::LOGICALOP_OR; in ConvertLogicalOperation()
633 case GL_NOR: return sw::LOGICALOP_NOR; in ConvertLogicalOperation()
634 case GL_XOR: return sw::LOGICALOP_XOR; in ConvertLogicalOperation()
635 case GL_EQUIV: return sw::LOGICALOP_EQUIV; in ConvertLogicalOperation()
636 case GL_AND_REVERSE: return sw::LOGICALOP_AND_REVERSE; in ConvertLogicalOperation()
637 case GL_AND_INVERTED: return sw::LOGICALOP_AND_INVERTED; in ConvertLogicalOperation()
638 case GL_OR_REVERSE: return sw::LOGICALOP_OR_REVERSE; in ConvertLogicalOperation()
639 case GL_OR_INVERTED: return sw::LOGICALOP_OR_INVERTED; in ConvertLogicalOperation()
643 return sw::LOGICALOP_COPY; in ConvertLogicalOperation()
646 sw::StencilOperation ConvertStencilOp(GLenum stencilOp) in ConvertStencilOp()
650 case GL_ZERO: return sw::OPERATION_ZERO; in ConvertStencilOp()
651 case GL_KEEP: return sw::OPERATION_KEEP; in ConvertStencilOp()
652 case GL_REPLACE: return sw::OPERATION_REPLACE; in ConvertStencilOp()
653 case GL_INCR: return sw::OPERATION_INCRSAT; in ConvertStencilOp()
654 case GL_DECR: return sw::OPERATION_DECRSAT; in ConvertStencilOp()
655 case GL_INVERT: return sw::OPERATION_INVERT; in ConvertStencilOp()
656 case GL_INCR_WRAP_OES: return sw::OPERATION_INCR; in ConvertStencilOp()
657 case GL_DECR_WRAP_OES: return sw::OPERATION_DECR; in ConvertStencilOp()
661 return sw::OPERATION_KEEP; in ConvertStencilOp()
664 sw::AddressingMode ConvertTextureWrap(GLenum wrap) in ConvertTextureWrap()
668 case GL_REPEAT: return sw::ADDRESSING_WRAP; in ConvertTextureWrap()
669 case GL_CLAMP_TO_EDGE: return sw::ADDRESSING_CLAMP; in ConvertTextureWrap()
670 case GL_MIRRORED_REPEAT_OES: return sw::ADDRESSING_MIRROR; in ConvertTextureWrap()
674 return sw::ADDRESSING_WRAP; in ConvertTextureWrap()
677 sw::CullMode ConvertCullMode(GLenum cullFace, GLenum frontFace) in ConvertCullMode()
682 return (frontFace == GL_CCW ? sw::CULL_CLOCKWISE : sw::CULL_COUNTERCLOCKWISE); in ConvertCullMode()
684 return (frontFace == GL_CCW ? sw::CULL_COUNTERCLOCKWISE : sw::CULL_CLOCKWISE); in ConvertCullMode()
686 return sw::CULL_NONE; // culling will be handled during draw in ConvertCullMode()
690 return sw::CULL_COUNTERCLOCKWISE; in ConvertCullMode()
701 sw::MipmapType ConvertMipMapFilter(GLenum minFilter) in ConvertMipMapFilter()
707 return sw::MIPMAP_NONE; in ConvertMipMapFilter()
711 return sw::MIPMAP_POINT; in ConvertMipMapFilter()
715 return sw::MIPMAP_LINEAR; in ConvertMipMapFilter()
719 return sw::MIPMAP_NONE; in ConvertMipMapFilter()
723 sw::FilterType ConvertTextureFilter(GLenum minFilter, GLenum magFilter, float maxAnisotropy) in ConvertTextureFilter()
727 return sw::FILTER_ANISOTROPIC; in ConvertTextureFilter()
730 sw::FilterType magFilterType = sw::FILTER_POINT; in ConvertTextureFilter()
733 case GL_NEAREST: magFilterType = sw::FILTER_POINT; break; in ConvertTextureFilter()
734 case GL_LINEAR: magFilterType = sw::FILTER_LINEAR; break; in ConvertTextureFilter()
743 return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_POINT : sw::FILTER_MIN_POINT_MAG_LINEAR; in ConvertTextureFilter()
747 return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_MIN_LINEAR_MAG_POINT : sw::FILTER_LINEAR; in ConvertTextureFilter()
750 return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_POINT : sw::FILTER_MIN_POINT_MAG_LINEAR; in ConvertTextureFilter()
754 …bool ConvertPrimitiveType(GLenum primitiveType, GLsizei elementCount, GLenum elementType, sw::Dra… in ConvertPrimitiveType()
759 drawType = sw::DRAW_POINTLIST; in ConvertPrimitiveType()
763 drawType = sw::DRAW_LINELIST; in ConvertPrimitiveType()
767 drawType = sw::DRAW_LINELOOP; in ConvertPrimitiveType()
771 drawType = sw::DRAW_LINESTRIP; in ConvertPrimitiveType()
775 drawType = sw::DRAW_TRIANGLELIST; in ConvertPrimitiveType()
779 drawType = sw::DRAW_TRIANGLESTRIP; in ConvertPrimitiveType()
783 drawType = sw::DRAW_TRIANGLEFAN; in ConvertPrimitiveType()
790 sw::DrawType elementSize; in ConvertPrimitiveType()
793 case GL_NONE_OES: elementSize = sw::DRAW_NONINDEXED; break; in ConvertPrimitiveType()
794 case GL_UNSIGNED_BYTE: elementSize = sw::DRAW_INDEXED8; break; in ConvertPrimitiveType()
795 case GL_UNSIGNED_SHORT: elementSize = sw::DRAW_INDEXED16; break; in ConvertPrimitiveType()
796 case GL_UNSIGNED_INT: elementSize = sw::DRAW_INDEXED32; break; in ConvertPrimitiveType()
800 drawType = sw::DrawType(drawType | elementSize); in ConvertPrimitiveType()
805 sw::TextureStage::StageOperation ConvertCombineOperation(GLenum operation) in ConvertCombineOperation()
809 case GL_REPLACE: return sw::TextureStage::STAGE_SELECTARG1; in ConvertCombineOperation()
810 case GL_MODULATE: return sw::TextureStage::STAGE_MODULATE; in ConvertCombineOperation()
811 case GL_ADD: return sw::TextureStage::STAGE_ADD; in ConvertCombineOperation()
812 case GL_ADD_SIGNED: return sw::TextureStage::STAGE_ADDSIGNED; in ConvertCombineOperation()
813 case GL_INTERPOLATE: return sw::TextureStage::STAGE_LERP; in ConvertCombineOperation()
814 case GL_SUBTRACT: return sw::TextureStage::STAGE_SUBTRACT; in ConvertCombineOperation()
815 case GL_DOT3_RGB: return sw::TextureStage::STAGE_DOT3; in ConvertCombineOperation()
816 case GL_DOT3_RGBA: return sw::TextureStage::STAGE_DOT3; in ConvertCombineOperation()
817 default: UNREACHABLE(operation); return sw::TextureStage::STAGE_SELECTARG1; in ConvertCombineOperation()
821 sw::TextureStage::SourceArgument ConvertSourceArgument(GLenum argument) in ConvertSourceArgument()
825 case GL_TEXTURE: return sw::TextureStage::SOURCE_TEXTURE; in ConvertSourceArgument()
826 case GL_CONSTANT: return sw::TextureStage::SOURCE_CONSTANT; in ConvertSourceArgument()
827 case GL_PRIMARY_COLOR: return sw::TextureStage::SOURCE_DIFFUSE; in ConvertSourceArgument()
828 case GL_PREVIOUS: return sw::TextureStage::SOURCE_CURRENT; in ConvertSourceArgument()
829 default: UNREACHABLE(argument); return sw::TextureStage::SOURCE_CURRENT; in ConvertSourceArgument()
833 sw::TextureStage::ArgumentModifier ConvertSourceOperand(GLenum operand) in ConvertSourceOperand()
837 case GL_SRC_COLOR: return sw::TextureStage::MODIFIER_COLOR; in ConvertSourceOperand()
838 case GL_ONE_MINUS_SRC_COLOR: return sw::TextureStage::MODIFIER_INVCOLOR; in ConvertSourceOperand()
839 case GL_SRC_ALPHA: return sw::TextureStage::MODIFIER_ALPHA; in ConvertSourceOperand()
840 case GL_ONE_MINUS_SRC_ALPHA: return sw::TextureStage::MODIFIER_INVALPHA; in ConvertSourceOperand()
841 default: UNREACHABLE(operand); return sw::TextureStage::MODIFIER_COLOR; in ConvertSourceOperand()
848 GLenum ConvertBackBufferFormat(sw::Format format) in ConvertBackBufferFormat()
852 case sw::FORMAT_A4R4G4B4: return GL_RGBA4_OES; in ConvertBackBufferFormat()
853 case sw::FORMAT_A8R8G8B8: return GL_RGBA8_OES; in ConvertBackBufferFormat()
854 case sw::FORMAT_A8B8G8R8: return GL_RGBA8_OES; in ConvertBackBufferFormat()
855 case sw::FORMAT_A1R5G5B5: return GL_RGB5_A1_OES; in ConvertBackBufferFormat()
856 case sw::FORMAT_R5G6B5: return GL_RGB565_OES; in ConvertBackBufferFormat()
857 case sw::FORMAT_X8R8G8B8: return GL_RGB8_OES; in ConvertBackBufferFormat()
858 case sw::FORMAT_X8B8G8R8: return GL_RGB8_OES; in ConvertBackBufferFormat()
866 GLenum ConvertDepthStencilFormat(sw::Format format) in ConvertDepthStencilFormat()
870 case sw::FORMAT_D16: in ConvertDepthStencilFormat()
871 case sw::FORMAT_D24X8: in ConvertDepthStencilFormat()
872 case sw::FORMAT_D32: in ConvertDepthStencilFormat()
874 case sw::FORMAT_D24S8: in ConvertDepthStencilFormat()